@@ -1,12 +1,18 @@
|
||||
import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile";
|
||||
import { EditProfileLayout } from "@/app_modules/katalog/profile";
|
||||
|
||||
export default async function Layout({ children, params }: { children: any, params: {id: string} }) {
|
||||
const data = await funGetUserProfile(params.id)
|
||||
const profileId = data?.Profile?.id
|
||||
export default async function Layout({
|
||||
children,
|
||||
params,
|
||||
}: {
|
||||
children: any;
|
||||
params: { id: string };
|
||||
}) {
|
||||
let profileId = params.id;
|
||||
|
||||
return (
|
||||
<>
|
||||
<EditProfileLayout profileId={profileId}>{children}</EditProfileLayout>
|
||||
<EditProfileLayout>{children}</EditProfileLayout>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -109,9 +109,9 @@ export default function HomeLayout({
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Stack align="center" spacing={0}>
|
||||
<Stack align="center" spacing={2}>
|
||||
<ActionIcon variant={"transparent"}>
|
||||
{user.Profile === null ? <IconUserCircle color="white" /> : <Avatar radius={"xl"} size={20} src={RouterProfile.api_foto_profile + `${user.Profile.imagesId}`}/>}
|
||||
{user.Profile === null ? <IconUserCircle color="white" /> : <Avatar radius={"xl"} size={30} src={RouterProfile.api_foto_profile + `${user.Profile.imagesId}`}/>}
|
||||
</ActionIcon>
|
||||
<Text fz={"xs"} c={"white"}>
|
||||
Profile
|
||||
|
||||
@@ -41,7 +41,9 @@ export default function KatalogView({
|
||||
profile={profile}
|
||||
userLoginId={userLoginId}
|
||||
/>
|
||||
{profile.User.id === userLoginId ? <User_Logout /> : ""}
|
||||
<Stack my={"lg"} w={"100%"}>
|
||||
{profile.User.id === userLoginId ? <User_Logout /> : ""}
|
||||
</Stack>
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -12,13 +12,7 @@ import { IconArrowLeft } from "@tabler/icons-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import ComponentKatalog_HeaderTamplate from "../../component/header_tamplate";
|
||||
|
||||
export default function EditProfileLayout({
|
||||
children,
|
||||
profileId,
|
||||
}: {
|
||||
children: any;
|
||||
profileId: any;
|
||||
}) {
|
||||
export default function EditProfileLayout({ children }: { children: any }) {
|
||||
const router = useRouter();
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user