# Voting
## feat - Voting user - Halaman kontribusi - Halaman riwayat ### No issuue
This commit is contained in:
19
src/app/dev/vote/detail/draft/[id]/layout.tsx
Normal file
19
src/app/dev/vote/detail/draft/[id]/layout.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import { LayoutVote_DetailDraft } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
|
||||
export default function Layout({
|
||||
children,
|
||||
params,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
params: { id: string };
|
||||
}) {
|
||||
let voteId = params.id;
|
||||
return (
|
||||
<>
|
||||
<LayoutVote_DetailDraft voteId={voteId}>
|
||||
{children}
|
||||
</LayoutVote_DetailDraft>
|
||||
</>
|
||||
);
|
||||
}
|
||||
13
src/app/dev/vote/detail/draft/[id]/page.tsx
Normal file
13
src/app/dev/vote/detail/draft/[id]/page.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Vote_DetailDraft } from "@/app_modules/vote";
|
||||
import { Vote_getOnebyId } from "@/app_modules/vote/fun/get/get_one_by_id";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const voteId = params.id;
|
||||
const dataVote = await Vote_getOnebyId(voteId);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Vote_DetailDraft dataVote={dataVote as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
import { LayoutVote_DetailDraft } from "@/app_modules/voting";
|
||||
import React from "react";
|
||||
|
||||
export default function Layout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<>
|
||||
<LayoutVote_DetailDraft>{children}</LayoutVote_DetailDraft>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import { Vote_DetailDraft } from "@/app_modules/voting";
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<>
|
||||
<Vote_DetailDraft />
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user