fix voting
deskripsi: - ubah metode pemanggilan data dari SSR menjadi metode API , pada page: detail all No Issue
This commit is contained in:
@@ -1,28 +1,14 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { LayoutVote_DetailKontribusi } from "@/app_modules/vote";
|
||||
import { voting_funGetOneVotingbyId } from "@/app_modules/vote/fun/get/fun_get_one_by_id";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
children,
|
||||
params,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
params: { id: string };
|
||||
}) {
|
||||
const votingId = params.id;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
const dataVoting = await voting_funGetOneVotingbyId(votingId);
|
||||
|
||||
return (
|
||||
<>
|
||||
<LayoutVote_DetailKontribusi
|
||||
votingId={votingId}
|
||||
userLoginId={userLoginId as string}
|
||||
dataVoting={dataVoting}
|
||||
>
|
||||
{children}
|
||||
</LayoutVote_DetailKontribusi>
|
||||
<LayoutVote_DetailKontribusi>{children}</LayoutVote_DetailKontribusi>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,28 +1,14 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { LayoutVote_MainDetail } from "@/app_modules/vote";
|
||||
import { voting_funGetOneVotingbyId } from "@/app_modules/vote/fun/get/fun_get_one_by_id";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
children,
|
||||
params,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
params: { id: string };
|
||||
}) {
|
||||
const votingId = params.id;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
const dataVoting = await voting_funGetOneVotingbyId(votingId);
|
||||
|
||||
return (
|
||||
<>
|
||||
<LayoutVote_MainDetail
|
||||
votingId={votingId}
|
||||
userLoginId={userLoginId as string}
|
||||
dataVoting={dataVoting}
|
||||
>
|
||||
{children}
|
||||
</LayoutVote_MainDetail>
|
||||
<LayoutVote_MainDetail>{children}</LayoutVote_MainDetail>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { Vote_MainDetail } from "@/app_modules/vote";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<Vote_MainDetail
|
||||
userLoginId={userLoginId as string}
|
||||
/>
|
||||
<Vote_MainDetail />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,29 +1,14 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { LayoutVote_DetailPublish } from "@/app_modules/vote";
|
||||
import { voting_funGetOneVotingbyId } from "@/app_modules/vote/fun/get/fun_get_one_by_id";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
children,
|
||||
params,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
params: { id: string };
|
||||
}) {
|
||||
const votingId = params.id;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
const dataVoting = await voting_funGetOneVotingbyId(votingId);
|
||||
|
||||
return (
|
||||
<>
|
||||
<LayoutVote_DetailPublish
|
||||
votingId={votingId}
|
||||
userLoginId={userLoginId as string}
|
||||
dataVoting={dataVoting}
|
||||
>
|
||||
{children}
|
||||
</LayoutVote_DetailPublish>
|
||||
<LayoutVote_DetailPublish>{children}</LayoutVote_DetailPublish>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
import { Vote_DetailPublish } from "@/app_modules/vote";
|
||||
import { Vote_getListKontributorById } from "@/app_modules/vote/fun/get/get_list_kontributor_by_id";
|
||||
import { voting_funGetOneVotingbyId } from "@/app_modules/vote/fun/get/fun_get_one_by_id";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let voteId = params.id;
|
||||
const dataVote = await voting_funGetOneVotingbyId(voteId);
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<Vote_DetailPublish dataVote={dataVote as any} />
|
||||
<Vote_DetailPublish />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,19 +1,9 @@
|
||||
import { Vote_DetailRiwayatSaya } from "@/app_modules/vote";
|
||||
import { Vote_getListKontributorById } from "@/app_modules/vote/fun/get/get_list_kontributor_by_id";
|
||||
import { Vote_getOnePublishbyId } from "@/app_modules/vote/fun/get/get_one_publish_by_id";
|
||||
|
||||
export default async function Page({params}: {params: {id: string}}) {
|
||||
let voteId = params.id;
|
||||
const dataVote = await Vote_getOnePublishbyId(voteId);
|
||||
const listKontributor = await Vote_getListKontributorById(voteId);
|
||||
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<Vote_DetailRiwayatSaya
|
||||
dataVote={dataVote as any}
|
||||
listKontributor={listKontributor}
|
||||
/>
|
||||
<Vote_DetailRiwayatSaya />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,25 +1,14 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { LayoutVote_DetailSemuaRiwayat } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
children,
|
||||
params,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
params: { id: string };
|
||||
}) {
|
||||
const votingId = params.id;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
return (
|
||||
<>
|
||||
<LayoutVote_DetailSemuaRiwayat
|
||||
votingId={votingId}
|
||||
userLoginId={userLoginId as string}
|
||||
>
|
||||
{children}
|
||||
</LayoutVote_DetailSemuaRiwayat>
|
||||
<LayoutVote_DetailSemuaRiwayat>{children}</LayoutVote_DetailSemuaRiwayat>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user