chore: Update UserAvatar component to use button for profile navigation
This commit is contained in:
11
src/routes/profile/+page.server.ts
Normal file
11
src/routes/profile/+page.server.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { redirect } from "@sveltejs/kit";
|
||||
import type { PageServerLoad, RequestEvent } from "../$types";
|
||||
|
||||
export const load: PageServerLoad = async (event: RequestEvent) => {
|
||||
if (!event.locals.user) {
|
||||
return redirect(302, "/login");
|
||||
}
|
||||
return {
|
||||
user: event.locals.user,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user