chore: Update UserAvatar component to use button for profile navigation

This commit is contained in:
Sean Morley
2024-06-13 17:13:39 +00:00
parent 6fd360a9d0
commit fc8a162aa9
3 changed files with 46 additions and 1 deletions

View 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,
};
};