Collaboration
Fix: - Integrasi API: Beranda, create, list partisipan, check sudah berpartisipasi ? ### No Issue
This commit is contained in:
@@ -1,22 +1,33 @@
|
||||
import {
|
||||
AvatarUsernameAndOtherComponent,
|
||||
BoxWithHeaderSection,
|
||||
Grid,
|
||||
StackCustom,
|
||||
TextCustom
|
||||
AvatarUsernameAndOtherComponent,
|
||||
BoxWithHeaderSection,
|
||||
Grid,
|
||||
Spacing,
|
||||
StackCustom,
|
||||
TextCustom,
|
||||
} from "@/components";
|
||||
|
||||
export default function Collaboration_BoxDetailSection({ id }: { id: string }) {
|
||||
export default function Collaboration_BoxDetailSection({
|
||||
data,
|
||||
}: {
|
||||
data: any;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<BoxWithHeaderSection>
|
||||
<AvatarUsernameAndOtherComponent
|
||||
avatar={data?.Author?.Profile?.imageId}
|
||||
name={data?.Author?.username}
|
||||
avatarHref={`/profile/${data?.Author?.Profile?.id}`}
|
||||
withBottomLine
|
||||
/>
|
||||
<Spacing height={10}/>
|
||||
<StackCustom>
|
||||
<AvatarUsernameAndOtherComponent />
|
||||
<TextCustom align="center" bold size="large">
|
||||
Judul Proyek {id}
|
||||
{data?.title || ""}
|
||||
</TextCustom>
|
||||
|
||||
{listData.map((item, index) => (
|
||||
{listData(data).map((item, index) => (
|
||||
<Grid key={index}>
|
||||
<Grid.Col span={4}>
|
||||
<TextCustom bold>{item.title}</TextCustom>
|
||||
@@ -32,23 +43,21 @@ export default function Collaboration_BoxDetailSection({ id }: { id: string }) {
|
||||
);
|
||||
}
|
||||
|
||||
const listData = [
|
||||
const listData = (data: any) => [
|
||||
{
|
||||
title: "Industri",
|
||||
value: "Pilihan Industri",
|
||||
value: data?.ProjectCollaborationMaster_Industri?.name || "-",
|
||||
},
|
||||
{
|
||||
title: "Deskripsi",
|
||||
value: "Deskripsi Proyek",
|
||||
title: "Lokasi",
|
||||
value: data?.lokasi || "-",
|
||||
},
|
||||
{
|
||||
title: "Tujuan Proyek",
|
||||
value:
|
||||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
||||
value: data?.purpose || "-",
|
||||
},
|
||||
{
|
||||
title: "Keuntungan Proyek",
|
||||
value:
|
||||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
||||
value: data?.benefit || "-",
|
||||
},
|
||||
];
|
||||
|
||||
@@ -7,24 +7,12 @@ import {
|
||||
import { Href } from "expo-router";
|
||||
|
||||
function Collaboration_BoxPublishSection({
|
||||
id,
|
||||
title,
|
||||
username,
|
||||
description,
|
||||
href,
|
||||
|
||||
// Avatar
|
||||
sourceAvatar,
|
||||
data,
|
||||
rightComponentAvatar,
|
||||
}: {
|
||||
id: string;
|
||||
title?: string;
|
||||
username?: string;
|
||||
description?: string;
|
||||
href: Href;
|
||||
|
||||
// Avatar
|
||||
sourceAvatar?: string;
|
||||
data: any;
|
||||
rightComponentAvatar?: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
@@ -32,21 +20,18 @@ function Collaboration_BoxPublishSection({
|
||||
<BoxWithHeaderSection href={href}>
|
||||
<StackCustom gap={0}>
|
||||
<AvatarUsernameAndOtherComponent
|
||||
avatarHref={`/profile/${id}`}
|
||||
name={username || "Username"}
|
||||
avatarHref={`/profile/${data?.Author?.id}`}
|
||||
name={data?.Author?.username || "Username"}
|
||||
rightComponent={rightComponentAvatar}
|
||||
avatar={sourceAvatar as any}
|
||||
avatar={data?.Author?.Profile?.imageId}
|
||||
withBottomLine
|
||||
/>
|
||||
|
||||
<StackCustom>
|
||||
<TextCustom truncate={2} size="large" bold align="center">
|
||||
{title || "Lorem ipsum dolor sit"}
|
||||
</TextCustom>
|
||||
<TextCustom truncate={2}>
|
||||
{description ||
|
||||
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Porro sed doloremque tempora soluta. Dolorem ex quidem ipsum tempora, ipsa, obcaecati quia suscipit numquam, voluptates commodi porro impedit natus quos doloremque!"}
|
||||
{data?.title || "-"}
|
||||
</TextCustom>
|
||||
<TextCustom truncate={2}>{data?.purpose || "-"}</TextCustom>
|
||||
{/* <TextCustom bold size="small" >
|
||||
2 Partisipan
|
||||
</TextCustom> */}
|
||||
|
||||
Reference in New Issue
Block a user