Initial commit: site monorepo with API, web, and infra.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { ProfileCard, ProfileEditor } from "@modules/profile";
|
||||
import { getProfile } from "@modules/profile/api/profileApi";
|
||||
|
||||
export default function ProfilePage(): JSX.Element {
|
||||
const { data, isLoading } = useQuery({
|
||||
queryKey: ["profile-me"],
|
||||
queryFn: getProfile
|
||||
});
|
||||
|
||||
if (isLoading || !data) {
|
||||
return (
|
||||
<main>
|
||||
<p>Loading profile...</p>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<main style={{ display: "grid", gap: "2rem", padding: "1.5rem" }}>
|
||||
<ProfileCard
|
||||
email={data.user.email}
|
||||
displayName={data.profile.display_name}
|
||||
avatarUrl={data.profile.avatar_url}
|
||||
/>
|
||||
<ProfileEditor profile={data} />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user