Component
Icon: - IconContribution - IconHistory Voting Add: - voting (tabs) - (user)/_layout : penambahan layout voting # No Issue
This commit is contained in:
@@ -150,6 +150,38 @@ export default function UserLayout() {
|
||||
|
||||
{/* ========== End Collaboration Section ========= */}
|
||||
|
||||
{/* ========== Voting Section ========= */}
|
||||
<Stack.Screen
|
||||
name="voting/create"
|
||||
options={{
|
||||
title: "Tambah Voting",
|
||||
headerLeft: () => <BackButton />,
|
||||
}}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="voting/(tabs)"
|
||||
options={{
|
||||
title: "Voting",
|
||||
headerLeft: () => <BackButton path="/home" />,
|
||||
}}
|
||||
/>
|
||||
{/* <Stack.Screen
|
||||
name="voting/[id]/index"
|
||||
options={{
|
||||
title: "Detail Voting",
|
||||
headerLeft: () => <BackButton />,
|
||||
}}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="voting/[id]/edit"
|
||||
options={{
|
||||
title: "Edit Voting",
|
||||
headerLeft: () => <BackButton />,
|
||||
}}
|
||||
/> */}
|
||||
|
||||
{/* ========== End Voting Section ========= */}
|
||||
|
||||
{/* ========== Job Section ========= */}
|
||||
<Stack.Screen
|
||||
name="job/create"
|
||||
|
||||
@@ -1,50 +1,43 @@
|
||||
import { IconHome, IconStatus } from "@/components/_Icon";
|
||||
import {
|
||||
IconContribution,
|
||||
IconHistory,
|
||||
IconHome,
|
||||
IconStatus,
|
||||
} from "@/components/_Icon";
|
||||
import { TabsStyles } from "@/styles/tabs-styles";
|
||||
import { FontAwesome5, Ionicons } from "@expo/vector-icons";
|
||||
import { Tabs } from "expo-router";
|
||||
|
||||
export default function EventTabsLayout() {
|
||||
return (
|
||||
<Tabs
|
||||
screenOptions={TabsStyles}
|
||||
>
|
||||
<Tabs screenOptions={TabsStyles}>
|
||||
<Tabs.Screen
|
||||
name="index"
|
||||
options={{
|
||||
title: "Beranda",
|
||||
tabBarIcon: ({ color }) => (
|
||||
<IconHome color={color}/>
|
||||
),
|
||||
tabBarIcon: ({ color }) => <IconHome color={color} />,
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="status"
|
||||
options={{
|
||||
title: "Status",
|
||||
tabBarIcon: ({ color }) => (
|
||||
<IconStatus color={color}/>
|
||||
),
|
||||
tabBarIcon: ({ color }) => <IconStatus color={color} />,
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="contribution"
|
||||
options={{
|
||||
title: "Kontribusi",
|
||||
tabBarIcon: ({ color }) => (
|
||||
<Ionicons size={20} name="extension-puzzle" color={color} />
|
||||
),
|
||||
tabBarIcon: ({ color }) => <IconContribution color={color} />,
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="history"
|
||||
options={{
|
||||
title: "Riwayat",
|
||||
tabBarIcon: ({ color }) => (
|
||||
<FontAwesome5 size={20} name="history" color={color} />
|
||||
),
|
||||
tabBarIcon: ({ color }) => <IconHistory color={color} />,
|
||||
}}
|
||||
/>
|
||||
</Tabs>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
43
app/(application)/(user)/voting/(tabs)/_layout.tsx
Normal file
43
app/(application)/(user)/voting/(tabs)/_layout.tsx
Normal file
@@ -0,0 +1,43 @@
|
||||
import {
|
||||
IconContribution,
|
||||
IconHistory,
|
||||
IconHome,
|
||||
IconStatus,
|
||||
} from "@/components/_Icon";
|
||||
import { TabsStyles } from "@/styles/tabs-styles";
|
||||
import { Tabs } from "expo-router";
|
||||
|
||||
export default function VotingTabsLayout() {
|
||||
return (
|
||||
<Tabs screenOptions={TabsStyles}>
|
||||
<Tabs.Screen
|
||||
name="index"
|
||||
options={{
|
||||
title: "Beranda",
|
||||
tabBarIcon: ({ color }) => <IconHome color={color} />,
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="status"
|
||||
options={{
|
||||
title: "Status",
|
||||
tabBarIcon: ({ color }) => <IconStatus color={color} />,
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="contribution"
|
||||
options={{
|
||||
title: "Kontribusi",
|
||||
tabBarIcon: ({ color }) => <IconContribution color={color} />,
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="history"
|
||||
options={{
|
||||
title: "Riwayat",
|
||||
tabBarIcon: ({ color }) => <IconHistory color={color} />,
|
||||
}}
|
||||
/>
|
||||
</Tabs>
|
||||
);
|
||||
}
|
||||
9
app/(application)/(user)/voting/(tabs)/contribution.tsx
Normal file
9
app/(application)/(user)/voting/(tabs)/contribution.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { TextCustom, ViewWrapper } from "@/components";
|
||||
|
||||
export default function VotingContribution() {
|
||||
return (
|
||||
<ViewWrapper>
|
||||
<TextCustom>Voting Contribution</TextCustom>
|
||||
</ViewWrapper>
|
||||
);
|
||||
}
|
||||
9
app/(application)/(user)/voting/(tabs)/history.tsx
Normal file
9
app/(application)/(user)/voting/(tabs)/history.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { TextCustom, ViewWrapper } from "@/components";
|
||||
|
||||
export default function VotingHistory() {
|
||||
return (
|
||||
<ViewWrapper>
|
||||
<TextCustom>Voting History</TextCustom>
|
||||
</ViewWrapper>
|
||||
);
|
||||
}
|
||||
9
app/(application)/(user)/voting/(tabs)/index.tsx
Normal file
9
app/(application)/(user)/voting/(tabs)/index.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { TextCustom, ViewWrapper } from "@/components";
|
||||
|
||||
export default function VotingBeranda() {
|
||||
return (
|
||||
<ViewWrapper>
|
||||
<TextCustom>Voting Beranda</TextCustom>
|
||||
</ViewWrapper>
|
||||
);
|
||||
}
|
||||
9
app/(application)/(user)/voting/(tabs)/status.tsx
Normal file
9
app/(application)/(user)/voting/(tabs)/status.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { TextCustom, ViewWrapper } from "@/components";
|
||||
|
||||
export default function VotingStatus() {
|
||||
return (
|
||||
<ViewWrapper>
|
||||
<TextCustom>Voting Status</TextCustom>
|
||||
</ViewWrapper>
|
||||
);
|
||||
}
|
||||
9
app/(application)/(user)/voting/create.tsx
Normal file
9
app/(application)/(user)/voting/create.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { TextInputCustom, ViewWrapper } from "@/components";
|
||||
|
||||
export default function CreateVoting() {
|
||||
return (
|
||||
<ViewWrapper>
|
||||
<TextInputCustom>Create Voting</TextInputCustom>
|
||||
</ViewWrapper>
|
||||
);
|
||||
}
|
||||
14
components/_Icon/IconContribution.tsx
Normal file
14
components/_Icon/IconContribution.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { ICON_SIZE_SMALL } from "@/constants/constans-value";
|
||||
import { Ionicons } from "@expo/vector-icons";
|
||||
|
||||
export default function IconContribution({ color }: { color?: string }) {
|
||||
return (
|
||||
<>
|
||||
<Ionicons
|
||||
size={ICON_SIZE_SMALL}
|
||||
name="extension-puzzle"
|
||||
color={color || "white"}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
9
components/_Icon/IconHistory.tsx
Normal file
9
components/_Icon/IconHistory.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { FontAwesome5 } from "@expo/vector-icons";
|
||||
|
||||
export default function IconHistory({ color }: { color?: string }) {
|
||||
return (
|
||||
<>
|
||||
<FontAwesome5 size={20} name="history" color={color} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
import IconContribution from "./IconContribution";
|
||||
import IconEdit from "./IconEdit";
|
||||
import IconHistory from "./IconHistory";
|
||||
import IconHome from "./IconHome";
|
||||
import IconStatus from "./IconStatus";
|
||||
|
||||
export { IconEdit, IconHome, IconStatus };
|
||||
export { IconContribution, IconEdit, IconHistory, IconHome, IconStatus };
|
||||
|
||||
@@ -16,12 +16,17 @@ export default function Home_FeatureSection() {
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity
|
||||
style={stylesHome.gridItem}
|
||||
onPress={() => router.push("/(application)/(user)/collaboration/(tabs)")}
|
||||
onPress={() =>
|
||||
router.push("/(application)/(user)/collaboration/(tabs)")
|
||||
}
|
||||
>
|
||||
<Ionicons name="share" size={48} color="white" />
|
||||
<Text style={stylesHome.gridLabel}>Collaboration</Text>
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity style={stylesHome.gridItem}>
|
||||
<TouchableOpacity
|
||||
style={stylesHome.gridItem}
|
||||
onPress={() => router.push("/(application)/(user)/voting/(tabs)")}
|
||||
>
|
||||
<Ionicons name="cube" size={48} color="white" />
|
||||
<Text style={stylesHome.gridLabel}>Voting</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
Reference in New Issue
Block a user