Files
hipmi/src/app_modules/colab/component/header_author_name.tsx
Bagasbanuna02 284787243b Fix: Avatar
Deskripsi:
- Avatar job
- Avatar collaboration
- Avatar event
## No Issuue
2024-10-01 16:31:12 +08:00

84 lines
2.2 KiB
TypeScript

"use client";
import { ComponentGlobal_AvatarAndUsername } from "@/app_modules/_global/component";
import { Group, Stack, Text } from "@mantine/core";
import { useRouter } from "next/navigation";
export default function ComponentColab_AuthorNameOnHeader({
tglPublish,
profile,
}: {
tglPublish?: Date;
profile: any;
}) {
const router = useRouter();
return (
<>
<ComponentGlobal_AvatarAndUsername
profile={profile}
component={
<Group position="right">
{tglPublish ? (
<Text fz={"xs"}>
{new Intl.DateTimeFormat("id-ID", {
dateStyle: "medium",
}).format(tglPublish)}
</Text>
) : (
""
)}
</Group>
}
/>
<Stack spacing={"xs"}>
{/* <Grid>
<Grid.Col
span={"content"}
onClick={() => {
if (profileId) {
router.push(RouterProfile.katalogOLD + profileId);
} else {
ComponentGlobal_NotifikasiPeringatan("Id tidak ditemukan");
}
}}
>
<Avatar
size={30}
sx={{ borderStyle: "solid", borderWidth: "0.5px" }}
radius={"xl"}
bg={"gray.1"}
src={
imagesId
? RouterProfile.api_foto_profile + imagesId
: "/aset/global/avatar.png"
}
/>
</Grid.Col>
<Grid.Col span={"auto"}>
<Stack justify="center" h={"100%"}>
<Text lineClamp={1} fz={"sm"} fw={"bold"}>
{authorName ? authorName : "Nama author"}
</Text>
</Stack>
</Grid.Col>
<Grid.Col span={"content"}>
<Stack justify="center" h={"100%"}>
{tglPublish ? (
<Text fz={"xs"}>
{new Intl.DateTimeFormat("id-ID", {
dateStyle: "medium"
}).format(tglPublish)}
</Text>
) : (
""
)}
</Stack>
</Grid.Col>
</Grid> */}
</Stack>
</>
);
}