@@ -1,12 +1,18 @@
|
|||||||
import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile";
|
import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile";
|
||||||
import { EditProfileLayout } from "@/app_modules/katalog/profile";
|
import { EditProfileLayout } from "@/app_modules/katalog/profile";
|
||||||
|
|
||||||
export default async function Layout({ children, params }: { children: any, params: {id: string} }) {
|
export default async function Layout({
|
||||||
const data = await funGetUserProfile(params.id)
|
children,
|
||||||
const profileId = data?.Profile?.id
|
params,
|
||||||
|
}: {
|
||||||
|
children: any;
|
||||||
|
params: { id: string };
|
||||||
|
}) {
|
||||||
|
let profileId = params.id;
|
||||||
|
|
||||||
return (
|
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"}>
|
<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>
|
</ActionIcon>
|
||||||
<Text fz={"xs"} c={"white"}>
|
<Text fz={"xs"} c={"white"}>
|
||||||
Profile
|
Profile
|
||||||
|
|||||||
@@ -41,7 +41,9 @@ export default function KatalogView({
|
|||||||
profile={profile}
|
profile={profile}
|
||||||
userLoginId={userLoginId}
|
userLoginId={userLoginId}
|
||||||
/>
|
/>
|
||||||
{profile.User.id === userLoginId ? <User_Logout /> : ""}
|
<Stack my={"lg"} w={"100%"}>
|
||||||
|
{profile.User.id === userLoginId ? <User_Logout /> : ""}
|
||||||
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -12,13 +12,7 @@ import { IconArrowLeft } from "@tabler/icons-react";
|
|||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import ComponentKatalog_HeaderTamplate from "../../component/header_tamplate";
|
import ComponentKatalog_HeaderTamplate from "../../component/header_tamplate";
|
||||||
|
|
||||||
export default function EditProfileLayout({
|
export default function EditProfileLayout({ children }: { children: any }) {
|
||||||
children,
|
|
||||||
profileId,
|
|
||||||
}: {
|
|
||||||
children: any;
|
|
||||||
profileId: any;
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
Reference in New Issue
Block a user