Voting:
Add: - ComponentDetailDataSection : Tampilan judul, deskripsi, batas waktu - BoxDetailHistorySection - (user)/voting/[id]/history Fix: Perbaikan component detail data pada: - screens/Voting/BoxDetailSection.tsx - screens/Voting/BoxDetailPublishSection.tsx - screens/Voting/BoxDetailContribution.tsx # No Issue
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import {
|
||||
BadgeCustom,
|
||||
BoxWithHeaderSection,
|
||||
Spacing,
|
||||
StackCustom,
|
||||
TextCustom,
|
||||
BadgeCustom,
|
||||
BoxWithHeaderSection,
|
||||
Spacing,
|
||||
StackCustom,
|
||||
TextCustom,
|
||||
} from "@/components";
|
||||
import { GStyles } from "@/styles/global-styles";
|
||||
import dayjs from "dayjs";
|
||||
import { View } from "react-native";
|
||||
import { Voting_ComponentDetailDataSection } from "./ComponentDetailDataSection";
|
||||
|
||||
export function Voting_BoxDetailContributionSection({
|
||||
headerAvatar,
|
||||
@@ -19,27 +18,7 @@ export function Voting_BoxDetailContributionSection({
|
||||
<BoxWithHeaderSection>
|
||||
{headerAvatar ? headerAvatar : <Spacing />}
|
||||
<StackCustom gap={"lg"}>
|
||||
<TextCustom align="center" bold size="large">
|
||||
Title of Voting Here
|
||||
</TextCustom>
|
||||
<TextCustom>
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit.
|
||||
Perspiciatis corporis blanditiis est provident corrupti facilis iste
|
||||
cum voluptate. Natus eum aut quos consequatur doloribus fugiat sit
|
||||
ullam minima non enim?
|
||||
</TextCustom>
|
||||
<View>
|
||||
<TextCustom bold size="small" align="center">
|
||||
Batas Voting
|
||||
</TextCustom>
|
||||
<BadgeCustom
|
||||
style={[GStyles.alignSelfCenter, { width: "70%" }]}
|
||||
variant="light"
|
||||
>
|
||||
{dayjs().format("DD/MM/YYYY")} -{" "}
|
||||
{dayjs().add(1, "day").format("DD/MM/YYYY")}
|
||||
</BadgeCustom>
|
||||
</View>
|
||||
<Voting_ComponentDetailDataSection />
|
||||
|
||||
<StackCustom gap={"xs"}>
|
||||
<TextCustom bold size="small" align="center">
|
||||
|
||||
23
screens/Voting/BoxDetailHistorySection.tsx
Normal file
23
screens/Voting/BoxDetailHistorySection.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import {
|
||||
BoxWithHeaderSection,
|
||||
Spacing,
|
||||
StackCustom
|
||||
} from "@/components";
|
||||
import { Voting_ComponentDetailDataSection } from "./ComponentDetailDataSection";
|
||||
|
||||
export function Voting_BoxDetailHistorySection({
|
||||
headerAvatar,
|
||||
}: {
|
||||
headerAvatar?: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<BoxWithHeaderSection>
|
||||
{headerAvatar ? headerAvatar : <Spacing />}
|
||||
<StackCustom>
|
||||
<Voting_ComponentDetailDataSection />
|
||||
</StackCustom>
|
||||
</BoxWithHeaderSection>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,16 +1,14 @@
|
||||
import {
|
||||
BadgeCustom,
|
||||
BoxWithHeaderSection,
|
||||
ButtonCustom,
|
||||
Spacing,
|
||||
StackCustom,
|
||||
TextCustom,
|
||||
BoxWithHeaderSection,
|
||||
ButtonCustom,
|
||||
Spacing,
|
||||
StackCustom,
|
||||
TextCustom
|
||||
} from "@/components";
|
||||
import { RadioCustom, RadioGroup } from "@/components/Radio/RadioCustom";
|
||||
import { GStyles } from "@/styles/global-styles";
|
||||
import dayjs from "dayjs";
|
||||
import { useState } from "react";
|
||||
import { View } from "react-native";
|
||||
import { Voting_ComponentDetailDataSection } from "./ComponentDetailDataSection";
|
||||
|
||||
export function Voting_BoxDetailPublishSection({
|
||||
headerAvatar,
|
||||
@@ -23,27 +21,7 @@ export function Voting_BoxDetailPublishSection({
|
||||
<BoxWithHeaderSection>
|
||||
{headerAvatar ? headerAvatar : <Spacing />}
|
||||
<StackCustom gap={"lg"}>
|
||||
<TextCustom align="center" bold size="large">
|
||||
Title of Voting Here
|
||||
</TextCustom>
|
||||
<TextCustom>
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit.
|
||||
Perspiciatis corporis blanditiis est provident corrupti facilis iste
|
||||
cum voluptate. Natus eum aut quos consequatur doloribus fugiat sit
|
||||
ullam minima non enim?
|
||||
</TextCustom>
|
||||
<View>
|
||||
<TextCustom bold size="small" align="center">
|
||||
Batas Voting
|
||||
</TextCustom>
|
||||
<BadgeCustom
|
||||
style={[GStyles.alignSelfCenter, { width: "70%" }]}
|
||||
variant="light"
|
||||
>
|
||||
{dayjs().format("DD/MM/YYYY")} -{" "}
|
||||
{dayjs().add(1, "day").format("DD/MM/YYYY")}
|
||||
</BadgeCustom>
|
||||
</View>
|
||||
<Voting_ComponentDetailDataSection />
|
||||
|
||||
<View>
|
||||
<TextCustom bold size="small">
|
||||
@@ -61,9 +39,7 @@ export function Voting_BoxDetailPublishSection({
|
||||
</RadioGroup>
|
||||
</View>
|
||||
|
||||
<ButtonCustom onPress={() => console.log("vote")}>
|
||||
Vote
|
||||
</ButtonCustom>
|
||||
<ButtonCustom onPress={() => console.log("vote")}>Vote</ButtonCustom>
|
||||
</StackCustom>
|
||||
</BoxWithHeaderSection>
|
||||
</>
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import {
|
||||
BadgeCustom,
|
||||
BoxWithHeaderSection,
|
||||
Spacing,
|
||||
StackCustom,
|
||||
TextCustom,
|
||||
BoxWithHeaderSection,
|
||||
Spacing,
|
||||
StackCustom,
|
||||
TextCustom
|
||||
} from "@/components";
|
||||
import { GStyles } from "@/styles/global-styles";
|
||||
import dayjs from "dayjs";
|
||||
import { View } from "react-native";
|
||||
import { Voting_ComponentDetailDataSection } from "./ComponentDetailDataSection";
|
||||
|
||||
export function Voting_BoxDetailSection({
|
||||
headerAvatar,
|
||||
@@ -19,27 +17,8 @@ export function Voting_BoxDetailSection({
|
||||
<BoxWithHeaderSection>
|
||||
{headerAvatar ? headerAvatar : <Spacing />}
|
||||
<StackCustom>
|
||||
<TextCustom align="center" bold size="large">
|
||||
Title of Voting Here
|
||||
</TextCustom>
|
||||
<TextCustom>
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit.
|
||||
Perspiciatis corporis blanditiis est provident corrupti facilis iste
|
||||
cum voluptate. Natus eum aut quos consequatur doloribus fugiat sit
|
||||
ullam minima non enim?
|
||||
</TextCustom>
|
||||
<View>
|
||||
<TextCustom bold size="small" align="center">
|
||||
Batas Voting
|
||||
</TextCustom>
|
||||
<BadgeCustom
|
||||
style={[GStyles.alignSelfCenter, { width: "70%" }]}
|
||||
variant="light"
|
||||
>
|
||||
{dayjs().format("DD/MM/YYYY")} -{" "}
|
||||
{dayjs().add(1, "day").format("DD/MM/YYYY")}
|
||||
</BadgeCustom>
|
||||
</View>
|
||||
<Voting_ComponentDetailDataSection/>
|
||||
<Spacing/>
|
||||
|
||||
<View>
|
||||
<TextCustom bold size="small">
|
||||
|
||||
32
screens/Voting/ComponentDetailDataSection.tsx
Normal file
32
screens/Voting/ComponentDetailDataSection.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
import { BadgeCustom, TextCustom } from "@/components";
|
||||
import { GStyles } from "@/styles/global-styles";
|
||||
import dayjs from "dayjs";
|
||||
import { View } from "react-native";
|
||||
|
||||
export function Voting_ComponentDetailDataSection() {
|
||||
return (
|
||||
<>
|
||||
<TextCustom align="center" bold size="large">
|
||||
Title of Voting Here
|
||||
</TextCustom>
|
||||
<TextCustom>
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Perspiciatis
|
||||
corporis blanditiis est provident corrupti facilis iste cum voluptate.
|
||||
Natus eum aut quos consequatur doloribus fugiat sit ullam minima non
|
||||
enim?
|
||||
</TextCustom>
|
||||
<View>
|
||||
<TextCustom bold size="small" align="center">
|
||||
Batas Voting
|
||||
</TextCustom>
|
||||
<BadgeCustom
|
||||
style={[GStyles.alignSelfCenter, { width: "70%" }]}
|
||||
variant="light"
|
||||
>
|
||||
{dayjs().format("DD/MM/YYYY")} -{" "}
|
||||
{dayjs().add(1, "day").format("DD/MM/YYYY")}
|
||||
</BadgeCustom>
|
||||
</View>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user