mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -11,6 +11,7 @@ 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";
|
||||
import {AvatarWithUpload} from "@/components/wrappers/Dashboard/Profile/Avatar/AvatarWithUpload";
|
||||
|
||||
export default async function RoutePage(props: PageParams<{}>) {
|
||||
|
||||
@@ -18,30 +19,16 @@ export default async function RoutePage(props: PageParams<{}>) {
|
||||
if (!user) {
|
||||
notFound()
|
||||
}
|
||||
|
||||
const userInfo = await prisma.user.findUnique({
|
||||
where: {
|
||||
email: user.email
|
||||
}
|
||||
})
|
||||
|
||||
console.log(userInfo)
|
||||
|
||||
const test = () => {
|
||||
console.log("test")
|
||||
}
|
||||
|
||||
return (
|
||||
<Page>
|
||||
{/*<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>
|
||||
<AvatarWithUpload user={userInfo}/>
|
||||
{user.name}
|
||||
<Badge className="ml-3 hidden lg:block">{userInfo.authMethod}</Badge>
|
||||
</PageTitle>
|
||||
@@ -49,7 +36,6 @@ export default async function RoutePage(props: PageParams<{}>) {
|
||||
<ButtonDeleteAccount/>
|
||||
</PageActions>
|
||||
</div>
|
||||
{/*</PageHeader>*/}
|
||||
<PageContent>
|
||||
<UserForm userId={userInfo.id} defaultValues={userInfo}/>
|
||||
</PageContent>
|
||||
|
||||
Reference in New Issue
Block a user