Files
hipmi/src/app_modules/colab/component/header_author_name.tsx
Bagasbanuna02 d0def08ff6 perbaikan(kolaborasi): memperbaiki bug modul kolaborasi dan tingkatkan komponen UI
Deskripsi:

- Perbaikan endpoint API dan routing kolaborasi
- Pembaruan tampilan grup kolaborasi dan partisipasi proyek
- Peningkatan komponen skeleton loading
- Perbaikan tampilan komponen avatar dan username
- Refaktor layout pembuatan dan detail kolaborasi
2025-01-02 14:42:49 +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";
import moment from "moment";
import "moment/locale/id";
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 lineClamp={1}>
{moment(tglPublish).locale("id").format("ll")}
</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 >
{new Intl.DateTimeFormat("id-ID", {
dateStyle: "medium"
}).format(tglPublish)}
</Text>
) : (
""
)}
</Stack>
</Grid.Col>
</Grid> */}
</Stack>
</>
);
}