mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Profile Page with update user information.
This commit is contained in:
@@ -6,6 +6,11 @@ import {requiredCurrentUser} from "@/auth/current-user";
|
||||
import {UserForm} from "@/components/wrappers/Dashboard/Profile/UserForm/UserForm";
|
||||
import {prisma} from "@/prisma";
|
||||
import {Badge} from "@/components/ui/badge";
|
||||
import Link from "next/link";
|
||||
import {Button} from "@/components/ui/button";
|
||||
import {ButtonWithConfirm} from "@/components/wrappers/Button/ButtonWithConfirm/ButtonWithConfirm";
|
||||
import {ButtonDeleteAccount} from "@/components/wrappers/Dashboard/Profile/ButtonDeleteAccount/ButtonDeleteAccount";
|
||||
import {useIsMobile} from "@/hooks/use-mobile";
|
||||
|
||||
export default async function RoutePage(props: PageParams<{}>) {
|
||||
|
||||
@@ -22,23 +27,32 @@ export default async function RoutePage(props: PageParams<{}>) {
|
||||
|
||||
console.log(userInfo)
|
||||
|
||||
const test = () => {
|
||||
console.log("test")
|
||||
}
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<PageHeader>
|
||||
<PageTitle className="flex items-center">
|
||||
<Avatar className="size-14 mr-3">
|
||||
<AvatarFallback>{user.name?.[0]}</AvatarFallback>
|
||||
{user.image ? (
|
||||
<AvatarImage src={user.image} alt={`${user.name ?? "-"}'s profile picture`}/>
|
||||
) : null}
|
||||
</Avatar>
|
||||
{user.name}
|
||||
<Badge className="ml-3">{userInfo.authMethod}</Badge>
|
||||
</PageTitle>
|
||||
</PageHeader>
|
||||
{/*<PageHeader>*/}
|
||||
<div className="justify-between gap-2 sm:flex">
|
||||
<PageTitle className="flex items-center">
|
||||
<Avatar className="size-14 mr-3">
|
||||
<AvatarFallback>{user.name?.[0]}</AvatarFallback>
|
||||
{user.image ? (
|
||||
<AvatarImage src={user.image} alt={`${user.name ?? "-"}'s profile picture`}/>
|
||||
) : null}
|
||||
</Avatar>
|
||||
{user.name}
|
||||
<Badge className="ml-3 hidden lg:block">{userInfo.authMethod}</Badge>
|
||||
</PageTitle>
|
||||
<PageActions className={"mt-2"}>
|
||||
<ButtonDeleteAccount/>
|
||||
</PageActions>
|
||||
</div>
|
||||
{/*</PageHeader>*/}
|
||||
<PageContent>
|
||||
<UserForm userId={userInfo.id} defaultValues={userInfo} />
|
||||
<UserForm userId={userInfo.id} defaultValues={userInfo}/>
|
||||
</PageContent>
|
||||
</Page>
|
||||
)
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user