mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Correcting some bugs and working on responsive.
This commit is contained in:
@@ -12,7 +12,7 @@ export default async function Layout({children}: { children: React.ReactNode })
|
||||
|
||||
const user = await currentUser()
|
||||
console.log(user)
|
||||
if(user){
|
||||
if (user) {
|
||||
const userInfo = await prisma.user.findUnique({
|
||||
where: {
|
||||
email: user?.email
|
||||
@@ -25,13 +25,15 @@ export default async function Layout({children}: { children: React.ReactNode })
|
||||
|
||||
return (
|
||||
<SidebarProvider>
|
||||
<AppSidebar/>
|
||||
<SidebarInset>
|
||||
<Header/>
|
||||
<main className="h-full">
|
||||
{children}
|
||||
</main>
|
||||
</SidebarInset>
|
||||
<div className="flex flex-col lg:flex-row w-full">
|
||||
<AppSidebar/>
|
||||
<SidebarInset>
|
||||
<Header/>
|
||||
<main className="h-full">
|
||||
{children}
|
||||
</main>
|
||||
</SidebarInset>
|
||||
</div>
|
||||
</SidebarProvider>
|
||||
)
|
||||
}
|
||||
@@ -27,13 +27,18 @@ export default async function RoutePage(props: PageParams<{}>) {
|
||||
<AvatarWithUpload user={userInfo}/>
|
||||
{user.name}
|
||||
<Badge className="ml-3 hidden lg:block">{userInfo.authMethod}</Badge>
|
||||
<Badge className="ml-3 hidden lg:block">{userInfo.role}</Badge>
|
||||
</PageTitle>
|
||||
<PageActions className={"mt-2"}>
|
||||
<PageActions className="mt-2 hidden sm:block">
|
||||
<ButtonDeleteAccount text="Delete my account"/>
|
||||
</PageActions>
|
||||
</div>
|
||||
<PageContent>
|
||||
<UserForm userId={userInfo.id} defaultValues={userInfo}/>
|
||||
<UserForm userId={userInfo.id} defaultValues={userInfo}/>
|
||||
<div className="mt-4 sm:hidden">
|
||||
<ButtonDeleteAccount text="Delete my account" />
|
||||
</div>
|
||||
|
||||
</PageContent>
|
||||
</Page>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user