Deskripsi
Event: Add app/(application)/(user)/event/[id]/history # No Issue"
This commit is contained in:
@@ -1,28 +1,25 @@
|
|||||||
import {
|
import {
|
||||||
AvatarCustom,
|
AvatarCustom,
|
||||||
AvatarUsernameAndOtherComponent,
|
AvatarUsernameAndOtherComponent,
|
||||||
BaseBox,
|
BoxWithHeaderSection,
|
||||||
Grid,
|
Grid,
|
||||||
StackCustom,
|
StackCustom,
|
||||||
TextCustom,
|
TextCustom,
|
||||||
ViewWrapper,
|
ViewWrapper
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
export default function EventContribution() {
|
export default function EventContribution() {
|
||||||
return (
|
return (
|
||||||
<ViewWrapper hideFooter>
|
<ViewWrapper hideFooter>
|
||||||
{Array.from({ length: 10 }).map((_, index) => (
|
{Array.from({ length: 10 }).map((_, index) => (
|
||||||
<BaseBox key={index} href={`/event/${index}/contribution`}>
|
<BoxWithHeaderSection key={index} href={`/event/${index}/contribution`}>
|
||||||
<StackCustom>
|
<StackCustom>
|
||||||
<AvatarUsernameAndOtherComponent
|
<AvatarUsernameAndOtherComponent
|
||||||
avatarHref={`/profile/${index}`}
|
avatarHref={`/profile/${index}`}
|
||||||
rightComponent={
|
rightComponent={
|
||||||
<TextCustom truncate>
|
<TextCustom truncate>
|
||||||
{new Date().toDateString().split(" ")[2] +
|
{new Date().toLocaleDateString()}
|
||||||
", " +
|
|
||||||
new Date().toDateString().split(" ")[1] +
|
|
||||||
" " +
|
|
||||||
new Date().toDateString().split(" ")[3]}
|
|
||||||
</TextCustom>
|
</TextCustom>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
@@ -39,7 +36,7 @@ export default function EventContribution() {
|
|||||||
))}
|
))}
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
</BaseBox>
|
</BoxWithHeaderSection>
|
||||||
))}
|
))}
|
||||||
</ViewWrapper>
|
</ViewWrapper>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import {
|
import {
|
||||||
BaseBox,
|
BoxWithHeaderSection,
|
||||||
Grid,
|
Grid,
|
||||||
ScrollableCustom,
|
ScrollableCustom,
|
||||||
StackCustom,
|
StackCustom,
|
||||||
TextCustom,
|
TextCustom
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
||||||
import { masterStatus } from "@/lib/dummy-data/_master/status";
|
import { masterStatus } from "@/lib/dummy-data/_master/status";
|
||||||
@@ -35,7 +35,7 @@ export default function EventStatus() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ViewWrapper headerComponent={scrollComponent}>
|
<ViewWrapper headerComponent={scrollComponent}>
|
||||||
<BaseBox href={`/event/${id}/${activeCategory}/detail-event`}>
|
<BoxWithHeaderSection href={`/event/${id}/${activeCategory}/detail-event`}>
|
||||||
<StackCustom gap={"xs"}>
|
<StackCustom gap={"xs"}>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.Col span={8}>
|
<Grid.Col span={8}>
|
||||||
@@ -57,7 +57,7 @@ export default function EventStatus() {
|
|||||||
dolore optio porro!
|
dolore optio porro!
|
||||||
</TextCustom>
|
</TextCustom>
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
</BaseBox>
|
</BoxWithHeaderSection>
|
||||||
</ViewWrapper>
|
</ViewWrapper>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
import { AccentColor } from "@/constants/color-palet";
|
import { AccentColor } from "@/constants/color-palet";
|
||||||
import {
|
import {
|
||||||
PADDING_EXTRA_SMALL,
|
|
||||||
PADDING_MEDIUM,
|
PADDING_MEDIUM,
|
||||||
PADDING_SMALL,
|
PADDING_SMALL
|
||||||
} from "@/constants/constans-value";
|
} from "@/constants/constans-value";
|
||||||
import { Href, router } from "expo-router";
|
import { Href, router } from "expo-router";
|
||||||
import {
|
import {
|
||||||
StyleProp,
|
StyleProp,
|
||||||
TouchableHighlight,
|
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
View,
|
View,
|
||||||
ViewStyle,
|
ViewStyle
|
||||||
} from "react-native";
|
} from "react-native";
|
||||||
|
|
||||||
interface BaseBoxProps {
|
interface BaseBoxProps {
|
||||||
@@ -20,6 +18,8 @@ interface BaseBoxProps {
|
|||||||
onPress?: () => void;
|
onPress?: () => void;
|
||||||
marginBottom?: number;
|
marginBottom?: number;
|
||||||
padding?: number;
|
padding?: number;
|
||||||
|
paddingTop?: number;
|
||||||
|
paddingBottom?: number;
|
||||||
paddingInline?: number;
|
paddingInline?: number;
|
||||||
paddingBlock?: number;
|
paddingBlock?: number;
|
||||||
}
|
}
|
||||||
@@ -32,6 +32,8 @@ export default function BaseBox({
|
|||||||
marginBottom = PADDING_MEDIUM,
|
marginBottom = PADDING_MEDIUM,
|
||||||
paddingBlock = PADDING_MEDIUM,
|
paddingBlock = PADDING_MEDIUM,
|
||||||
paddingInline = PADDING_SMALL,
|
paddingInline = PADDING_SMALL,
|
||||||
|
paddingTop = PADDING_MEDIUM,
|
||||||
|
paddingBottom = PADDING_MEDIUM,
|
||||||
}: BaseBoxProps) {
|
}: BaseBoxProps) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -49,6 +51,8 @@ export default function BaseBox({
|
|||||||
marginBottom,
|
marginBottom,
|
||||||
paddingBlock,
|
paddingBlock,
|
||||||
paddingInline,
|
paddingInline,
|
||||||
|
paddingTop,
|
||||||
|
paddingBottom,
|
||||||
},
|
},
|
||||||
style,
|
style,
|
||||||
]}
|
]}
|
||||||
|
|||||||
20
components/Box/BoxWithHeaderInformation.tsx
Normal file
20
components/Box/BoxWithHeaderInformation.tsx
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import { Href } from "expo-router";
|
||||||
|
import BaseBox from "./BaseBox";
|
||||||
|
|
||||||
|
export default function BoxWithHeaderSection({
|
||||||
|
children,
|
||||||
|
href,
|
||||||
|
onPress,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
href?: Href;
|
||||||
|
onPress?: () => void;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<BaseBox href={href} onPress={onPress} paddingTop={5}>
|
||||||
|
{children}
|
||||||
|
</BaseBox>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -19,6 +19,7 @@ import Grid from "./Grid/GridCustom";
|
|||||||
// Box
|
// Box
|
||||||
import BaseBox from "./Box/BaseBox";
|
import BaseBox from "./Box/BaseBox";
|
||||||
import BoxButtonOnFooter from "./Box/BoxButtonOnFooter";
|
import BoxButtonOnFooter from "./Box/BoxButtonOnFooter";
|
||||||
|
import BoxWithHeaderSection from "./Box/BoxWithHeaderInformation";
|
||||||
import InformationBox from "./Box/InformationBox";
|
import InformationBox from "./Box/InformationBox";
|
||||||
// Stack
|
// Stack
|
||||||
import StackCustom from "./Stack/StackCustom";
|
import StackCustom from "./Stack/StackCustom";
|
||||||
@@ -38,30 +39,35 @@ import ClickableCustom from "./Clickable/ClickableCustom";
|
|||||||
// Scroll
|
// Scroll
|
||||||
import ScrollableCustom from "./Scroll/ScrollCustom";
|
import ScrollableCustom from "./Scroll/ScrollCustom";
|
||||||
// ShareComponent
|
// ShareComponent
|
||||||
|
import AvatarUsernameAndOtherComponent from "./_ShareComponent/AvataraAndOtherHeaderComponent";
|
||||||
import Spacing from "./_ShareComponent/Spacing";
|
import Spacing from "./_ShareComponent/Spacing";
|
||||||
import ViewWrapper from "./_ShareComponent/ViewWrapper";
|
import ViewWrapper from "./_ShareComponent/ViewWrapper";
|
||||||
import AvatarUsernameAndOtherComponent from "./_ShareComponent/AvataraAndOtherHeaderComponent";
|
|
||||||
export {
|
export {
|
||||||
AlertCustom,
|
AlertCustom,
|
||||||
// Image
|
// Image
|
||||||
AvatarCustom,
|
AvatarCustom,
|
||||||
LandscapeFrameUploaded,
|
// ShareComponent
|
||||||
|
AvatarUsernameAndOtherComponent, LeftButtonCustom as BackButton,
|
||||||
// Box
|
// Box
|
||||||
BaseBox,
|
BaseBox,
|
||||||
BoxButtonOnFooter,
|
BoxButtonOnFooter, BoxWithHeaderSection,
|
||||||
InformationBox,
|
|
||||||
// Button
|
// Button
|
||||||
ButtonCenteredOnly,
|
ButtonCenteredOnly,
|
||||||
ButtonCustom,
|
ButtonCustom,
|
||||||
LeftButtonCustom as BackButton,
|
// Center
|
||||||
DotButton,
|
CenterCustom,
|
||||||
|
// Clickable
|
||||||
|
ClickableCustom,
|
||||||
|
// Divider
|
||||||
|
DividerCustom, DotButton,
|
||||||
// Drawer
|
// Drawer
|
||||||
DrawerCustom,
|
DrawerCustom,
|
||||||
MenuDrawerDynamicGrid,
|
|
||||||
// Grid
|
// Grid
|
||||||
Grid,
|
Grid, InformationBox, LandscapeFrameUploaded,
|
||||||
// Map
|
// Map
|
||||||
MapCustom,
|
MapCustom, MenuDrawerDynamicGrid,
|
||||||
|
// Scroll
|
||||||
|
ScrollableCustom,
|
||||||
// Select
|
// Select
|
||||||
SelectCustom,
|
SelectCustom,
|
||||||
// ShareComponent
|
// ShareComponent
|
||||||
@@ -75,15 +81,6 @@ export {
|
|||||||
// TextInput
|
// TextInput
|
||||||
TextInputCustom,
|
TextInputCustom,
|
||||||
// ViewWrapper
|
// ViewWrapper
|
||||||
ViewWrapper,
|
ViewWrapper
|
||||||
// Divider
|
|
||||||
DividerCustom,
|
|
||||||
// Center
|
|
||||||
CenterCustom,
|
|
||||||
// Clickable
|
|
||||||
ClickableCustom,
|
|
||||||
// Scroll
|
|
||||||
ScrollableCustom,
|
|
||||||
// ShareComponent
|
|
||||||
AvatarUsernameAndOtherComponent,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
AvatarUsernameAndOtherComponent,
|
AvatarUsernameAndOtherComponent,
|
||||||
BaseBox,
|
BoxWithHeaderSection,
|
||||||
StackCustom,
|
StackCustom,
|
||||||
TextCustom,
|
TextCustom,
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
@@ -26,7 +26,7 @@ export default function Event_BoxPublishSection({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<BaseBox href={`/event/${id}/history`}>
|
<BoxWithHeaderSection href={`/event/${id}/history`}>
|
||||||
<StackCustom gap={"xs"}>
|
<StackCustom gap={"xs"}>
|
||||||
<AvatarUsernameAndOtherComponent
|
<AvatarUsernameAndOtherComponent
|
||||||
avatarHref={`/profile/${id}`}
|
avatarHref={`/profile/${id}`}
|
||||||
@@ -42,7 +42,7 @@ export default function Event_BoxPublishSection({
|
|||||||
"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!"}
|
"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!"}
|
||||||
</TextCustom>
|
</TextCustom>
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
</BaseBox>
|
</BoxWithHeaderSection>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user