New repo mobile after delete ! #1
@@ -1,11 +1,11 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
|
||||
//app/(application)/(tabs)/_layout.tsx
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
import { Entypo, Ionicons } from "@expo/vector-icons";
|
||||
import { router, Tabs } from "expo-router";
|
||||
import { Text, TouchableOpacity } from "react-native";
|
||||
|
||||
export default function TabsLayout() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Tabs
|
||||
@@ -26,7 +26,24 @@ export default function TabsLayout() {
|
||||
<Entypo name="chat" size={20} color={MainColor.white} />
|
||||
),
|
||||
headerLeft: () => (
|
||||
<Ionicons name="arrow-back" onPress={() => {router.back()}} size={20} color={MainColor.white} />
|
||||
<Ionicons
|
||||
name="arrow-back"
|
||||
onPress={() => {
|
||||
router.back();
|
||||
}}
|
||||
size={20}
|
||||
color={MainColor.white}
|
||||
/>
|
||||
),
|
||||
tabBarButton: () => (
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
router.navigate("/event");
|
||||
}}
|
||||
>
|
||||
<Entypo name="chat" size={20} color={MainColor.white} />
|
||||
<Text style={{ color: MainColor.white }}>Event</Text>
|
||||
</TouchableOpacity>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import HomeView from "@/components/Home/HomeView";
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
import { Ionicons } from "@expo/vector-icons";
|
||||
import { Stack, useNavigation, useRouter } from "expo-router";
|
||||
import { useEffect } from "react";
|
||||
import { Stack } from "expo-router";
|
||||
import React from "react";
|
||||
import { View } from "react-native";
|
||||
|
||||
export default function Tabs() {
|
||||
// const router = useRouter();
|
||||
@@ -16,7 +15,25 @@ export default function Tabs() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<HomeView />
|
||||
<View>
|
||||
<Stack.Screen
|
||||
options={{
|
||||
title: "My home",
|
||||
headerStyle: { backgroundColor: MainColor.darkblue },
|
||||
headerTintColor: "#fff",
|
||||
headerTitleStyle: {
|
||||
fontWeight: "bold",
|
||||
},
|
||||
|
||||
// headerTitle: (props) => <LogoTitle {...props} />,
|
||||
}}
|
||||
/>
|
||||
<HomeView />
|
||||
{/* <Text>Home Screen</Text>
|
||||
<Link href={{ pathname: "/(application)/(tabs)/forum" }}>
|
||||
Go to Details
|
||||
</Link> */}
|
||||
</View>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import { AccentColor, MainColor } from "@/constants/color-palet";
|
||||
import { Ionicons } from "@expo/vector-icons";
|
||||
import { Stack } from "expo-router";
|
||||
import { router, Stack } from "expo-router";
|
||||
|
||||
export default function ApplicationLayout() {
|
||||
return (
|
||||
@@ -18,13 +17,12 @@ export default function ApplicationLayout() {
|
||||
headerLargeStyle: {
|
||||
backgroundColor: MainColor.darkblue,
|
||||
},
|
||||
headerShadowVisible: false,
|
||||
}}
|
||||
>
|
||||
<Stack.Screen
|
||||
name="(tabs)"
|
||||
options={{
|
||||
headerShown: false,
|
||||
headerShown: false,
|
||||
// title: "iii",
|
||||
// headerLeft: () => (
|
||||
// <Ionicons name="search" size={20} color={MainColor.white} />
|
||||
@@ -34,7 +32,36 @@ export default function ApplicationLayout() {
|
||||
// ),
|
||||
}}
|
||||
/>
|
||||
{/* <Stack.Screen name="forum/index" options={{ title: "Forum", }} /> */}
|
||||
<Stack.Screen
|
||||
name="event/index"
|
||||
options={{
|
||||
title: "Event",
|
||||
headerLeft: () => (
|
||||
<Ionicons
|
||||
name="arrow-back"
|
||||
size={20}
|
||||
color={MainColor.yellow}
|
||||
onPress={() => router.back()}
|
||||
/>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
{/* <Stack.Screen
|
||||
name="home"
|
||||
options={{
|
||||
title: "HIPMI",
|
||||
headerLeft: () => (
|
||||
<Ionicons name="search" size={20} color={MainColor.yellow} />
|
||||
),
|
||||
headerRight: () => (
|
||||
<Ionicons
|
||||
name="notifications"
|
||||
size={20}
|
||||
color={MainColor.yellow}
|
||||
/>
|
||||
),
|
||||
}}
|
||||
/> */}
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
|
||||
9
app/(application)/event/index.tsx
Normal file
9
app/(application)/event/index.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Text, View } from "react-native";
|
||||
|
||||
export default function Event() {
|
||||
return (
|
||||
<View>
|
||||
<Text>Event</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
@@ -1,9 +1,16 @@
|
||||
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
||||
import HomeView from "@/components/Home/HomeView";
|
||||
import { Styles } from "@/constants/global-styles";
|
||||
import { View } from "react-native";
|
||||
|
||||
export default function Application() {
|
||||
return (
|
||||
<>
|
||||
<HomeView />
|
||||
<ViewWrapper>
|
||||
<View style={Styles.container}>
|
||||
<HomeView />
|
||||
</View>
|
||||
</ViewWrapper>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
|
||||
import ButtonCustom from "@/components/_ShareComponent/Button/ButtonCustom";
|
||||
import Spacing from "@/components/_ShareComponent/Spacing";
|
||||
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
||||
import ButtonCustom from "@/components/Button/ButtonCustom";
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
import { globalStyles } from "@/constants/global-styles";
|
||||
import { Stack, useRouter } from "expo-router";
|
||||
import { Styles } from "@/constants/global-styles";
|
||||
import { useRouter } from "expo-router";
|
||||
import { useState } from "react";
|
||||
import { Text, View } from "react-native";
|
||||
import PhoneInput, { ICountry } from "react-native-international-phone-number";
|
||||
import { MaterialIcons } from "@expo/vector-icons";
|
||||
|
||||
export default function Login() {
|
||||
const router = useRouter();
|
||||
@@ -32,20 +31,13 @@ export default function Login() {
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
<ViewWrapper>
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
justifyContent: "center",
|
||||
height: "100%",
|
||||
}}
|
||||
>
|
||||
<ViewWrapper withBackground>
|
||||
<View style={Styles.authContainer}>
|
||||
<View>
|
||||
<View style={globalStyles.authContainer}>
|
||||
<Text style={globalStyles.authSubTitle}>WELCOME TO</Text>
|
||||
<View style={Styles.authContainerTitle}>
|
||||
<Text style={Styles.authSubTitle}>WELCOME TO</Text>
|
||||
<Spacing height={5} />
|
||||
<Text style={globalStyles.authTitle}>HIPMI BADUNG APPS</Text>
|
||||
<Text style={Styles.authTitle}>HIPMI BADUNG APPS</Text>
|
||||
<Spacing height={5} />
|
||||
</View>
|
||||
<Spacing height={50} />
|
||||
@@ -64,16 +56,6 @@ export default function Login() {
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
{/* Input dengan prefix teks */}
|
||||
{/* <TextInputCustom
|
||||
label="Nomor Telepon"
|
||||
placeholder="Masukkan nomor"
|
||||
value={phone}
|
||||
onChangeText={setPhone}
|
||||
iconLeft="+62"
|
||||
keyboardType="phone-pad"
|
||||
/> */}
|
||||
|
||||
<PhoneInput
|
||||
value={inputValue}
|
||||
onChangePhoneNumber={handleInputValue}
|
||||
|
||||
@@ -1,36 +1,29 @@
|
||||
import { Text, View } from "react-native";
|
||||
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
||||
import { globalStyles } from "@/constants/global-styles";
|
||||
import ButtonCustom from "@/components/_ShareComponent/Button/ButtonCustom";
|
||||
import Spacing from "@/components/_ShareComponent/Spacing";
|
||||
import { EvilIcons } from "@expo/vector-icons";
|
||||
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
||||
import { TextInputCustom } from "@/components/_ShareComponent/TextInput/TextInputCustom";
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
import { TextInputCustom } from "@/components/TextInput/TextInputCustom";
|
||||
import ButtonCustom from "@/components/Button/ButtonCustom";
|
||||
import { useRouter } from "expo-router";
|
||||
import { Styles } from "@/constants/global-styles";
|
||||
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
||||
import { router } from "expo-router";
|
||||
import { Text, View } from "react-native";
|
||||
|
||||
export default function Register() {
|
||||
const router = useRouter();
|
||||
return (
|
||||
<ViewWrapper>
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
justifyContent: "center",
|
||||
height: "100%",
|
||||
}}
|
||||
>
|
||||
<ViewWrapper withBackground>
|
||||
<View style={Styles.authContainer}>
|
||||
<View>
|
||||
<View style={globalStyles.authContainer}>
|
||||
<Text style={globalStyles.authTitle}>REGISTRASI</Text>
|
||||
<Spacing height={30} />
|
||||
<EvilIcons name="user" size={100} color={MainColor.yellow} />
|
||||
<Spacing height={30} />
|
||||
<View style={Styles.authContainerTitle}>
|
||||
<Text style={Styles.authTitle}>REGISTRASI</Text>
|
||||
<Spacing />
|
||||
<MaterialCommunityIcons name="account" size={100} color={MainColor.yellow} />
|
||||
<Spacing />
|
||||
|
||||
<Text style={globalStyles.textLabel}>
|
||||
<Text style={Styles.textLabel}>
|
||||
Anda akan terdaftar dengan nomor
|
||||
</Text>
|
||||
<Text style={globalStyles.textLabel}>+6282xxxxxxxxx</Text>
|
||||
<Spacing height={30} />
|
||||
<Text style={Styles.textLabel}>+6282xxxxxxxxx</Text>
|
||||
<Spacing />
|
||||
</View>
|
||||
<TextInputCustom placeholder="Masukkan username" />
|
||||
|
||||
@@ -41,16 +34,19 @@ export default function Register() {
|
||||
radius={10}
|
||||
onPress={() => (
|
||||
console.log("Success register"),
|
||||
router.push("/(application)/home")
|
||||
router.push("/(application)/(tabs)")
|
||||
)}
|
||||
/>
|
||||
{/* <Spacing height={10} />
|
||||
<ButtonCustom
|
||||
title="Katalog"
|
||||
<Spacing />
|
||||
{/* <ButtonCustom
|
||||
title="Home"
|
||||
backgroundColor={MainColor.yellow}
|
||||
textColor={MainColor.black}
|
||||
radius={10}
|
||||
onPress={() => router.push("/(application)/(katalog)")}
|
||||
onPress={() => {
|
||||
console.log("Home clicked");
|
||||
router.push("/(application)/home");
|
||||
}}
|
||||
/> */}
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -1,30 +1,23 @@
|
||||
import ButtonCustom from "@/components/Button/ButtonCustom";
|
||||
import ButtonCustom from "@/components/_ShareComponent/Button/ButtonCustom";
|
||||
import Spacing from "@/components/_ShareComponent/Spacing";
|
||||
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
import { globalStyles } from "@/constants/global-styles";
|
||||
import { useRouter } from "expo-router"
|
||||
|
||||
import { Styles } from "@/constants/global-styles";
|
||||
import { useRouter } from "expo-router";
|
||||
import { Text, View } from "react-native";
|
||||
import { OtpInput } from "react-native-otp-entry";
|
||||
|
||||
export default function Validasi() {
|
||||
const router = useRouter();
|
||||
return (
|
||||
<ViewWrapper>
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
justifyContent: "center",
|
||||
height: "100%",
|
||||
}}
|
||||
>
|
||||
<ViewWrapper withBackground>
|
||||
<View style={Styles.authContainer}>
|
||||
<View>
|
||||
<View style={globalStyles.authContainer}>
|
||||
<Text style={globalStyles.authTitle}>Verifikasi KOde OTP</Text>
|
||||
<View style={Styles.authContainerTitle}>
|
||||
<Text style={Styles.authTitle}>Verifikasi KOde OTP</Text>
|
||||
<Spacing height={30} />
|
||||
<Text style={globalStyles.textLabel}>Masukan 4 digit kode otp</Text>
|
||||
<Text style={globalStyles.textLabel}>
|
||||
<Text style={Styles.textLabel}>Masukan 4 digit kode otp</Text>
|
||||
<Text style={Styles.textLabel}>
|
||||
Yang di kirim ke +6282xxxxxxxxx
|
||||
</Text>
|
||||
<Spacing height={30} />
|
||||
@@ -46,9 +39,9 @@ export default function Validasi() {
|
||||
}}
|
||||
/>
|
||||
<Spacing height={30} />
|
||||
<Text style={globalStyles.textLabel}>
|
||||
<Text style={Styles.textLabel}>
|
||||
Tidak menerima kode ?{" "}
|
||||
<Text style={{ ...globalStyles.textLabel }}>Kirim Ulang</Text>
|
||||
<Text style={Styles.textLabel}>Kirim Ulang</Text>
|
||||
</Text>
|
||||
</View>
|
||||
<Spacing height={30} />
|
||||
|
||||
@@ -1,33 +1,18 @@
|
||||
import Spacing from "@/components/_ShareComponent/Spacing";
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
import { globalStyles } from "@/constants/global-styles";
|
||||
import { Styles } from "@/constants/global-styles";
|
||||
import { Ionicons } from "@expo/vector-icons";
|
||||
import { Image } from "expo-image";
|
||||
import { useNavigation } from "expo-router";
|
||||
import { useEffect } from "react";
|
||||
import { router } from "expo-router";
|
||||
import { ScrollView, Text, TouchableOpacity, View } from "react-native";
|
||||
import Icon from "react-native-vector-icons/FontAwesome";
|
||||
import DynamicTruncatedText from "../_ShareComponent/TruncatedText";
|
||||
import { stylesHome } from "./homeViewStyle";
|
||||
|
||||
export default function HomeView() {
|
||||
const navigation = useNavigation();
|
||||
useEffect(() => {
|
||||
navigation.setOptions({
|
||||
title: "HIPMI",
|
||||
headerLeft: () => (
|
||||
<Ionicons name="search" size={20} color={MainColor.white} />
|
||||
),
|
||||
headerRight: () => (
|
||||
<Ionicons name="notifications" size={20} color={MainColor.white} />
|
||||
),
|
||||
});
|
||||
}, [navigation]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<ScrollView contentContainerStyle={{ flexGrow: 1 }}>
|
||||
<View style={globalStyles.mainContainer}>
|
||||
<View style={Styles.homeContainer}>
|
||||
<Spacing height={20} />
|
||||
<View
|
||||
style={{
|
||||
@@ -54,7 +39,10 @@ export default function HomeView() {
|
||||
|
||||
{/* Grid Section */}
|
||||
<View style={stylesHome.gridContainer}>
|
||||
<TouchableOpacity style={stylesHome.gridItem}>
|
||||
<TouchableOpacity
|
||||
style={stylesHome.gridItem}
|
||||
onPress={() => router.push("/(application)/event")}
|
||||
>
|
||||
<Ionicons name="analytics" size={48} color="white" />
|
||||
<Text style={stylesHome.gridLabel}>Event</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
@@ -35,6 +35,7 @@ const ButtonCustom: React.FC<ButtonProps> = ({
|
||||
style={[styles.button, disabled && styles.disabled]}
|
||||
onPress={onPress}
|
||||
disabled={disabled}
|
||||
activeOpacity={0.8}
|
||||
>
|
||||
{/* Render icon jika tersedia */}
|
||||
{iconLeft && iconLeft}
|
||||
@@ -1,35 +1,43 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
import { globalStyles } from "@/constants/global-styles";
|
||||
import { Styles } from "@/constants/global-styles";
|
||||
import { ImageBackground, ScrollView, View } from "react-native";
|
||||
import { SafeAreaView } from "react-native-safe-area-context";
|
||||
import { SafeAreaProvider, SafeAreaView } from "react-native-safe-area-context";
|
||||
|
||||
interface ViewWrapperProps {
|
||||
children: React.ReactNode;
|
||||
withBackground?: boolean;
|
||||
}
|
||||
|
||||
const ViewWrapper = ({ children }: ViewWrapperProps) => {
|
||||
const ViewWrapper = ({
|
||||
children,
|
||||
withBackground = false,
|
||||
}: ViewWrapperProps) => {
|
||||
|
||||
const assetBackground = require("../../assets/images/main-background.png");
|
||||
|
||||
return (
|
||||
<SafeAreaView
|
||||
edges={[]}
|
||||
style={{
|
||||
flex: 1,
|
||||
// paddingTop: StatusBar.currentHeight,
|
||||
}}
|
||||
|
||||
>
|
||||
<ScrollView contentContainerStyle={{ flexGrow: 1 }} >
|
||||
<ImageBackground
|
||||
source={require("../../assets/images/main-background.png")}
|
||||
resizeMode="cover"
|
||||
style={globalStyles.imageBackground}
|
||||
>
|
||||
<View style={globalStyles.container}>{children}</View>
|
||||
</ImageBackground>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
<SafeAreaProvider>
|
||||
<SafeAreaView
|
||||
edges={[]}
|
||||
style={{
|
||||
flex: 1,
|
||||
// paddingTop: StatusBar.currentHeight,
|
||||
}}
|
||||
>
|
||||
<ScrollView contentContainerStyle={{ flexGrow: 1 }}>
|
||||
{withBackground ? (
|
||||
<ImageBackground
|
||||
source={assetBackground}
|
||||
resizeMode="cover"
|
||||
style={Styles.imageBackground}
|
||||
>
|
||||
<View style={Styles.containerWithBackground}>{children}</View>
|
||||
</ImageBackground>
|
||||
) : (
|
||||
<View style={Styles.container}>{children}</View>
|
||||
)}
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
</SafeAreaProvider>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,29 +1,31 @@
|
||||
import { StyleSheet } from "react-native";
|
||||
import { MainColor } from "./color-palet";
|
||||
|
||||
export const globalStyles = StyleSheet.create({
|
||||
export const Styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
paddingInline: 30,
|
||||
paddingBlock: 20,
|
||||
},
|
||||
mainContainer: {
|
||||
flex: 1,
|
||||
paddingInline: 25,
|
||||
paddingBlock: 10,
|
||||
backgroundColor: MainColor.darkblue,
|
||||
},
|
||||
|
||||
containerWithBackground: {
|
||||
flex: 1,
|
||||
paddingInline: 25,
|
||||
paddingBlock: 10,
|
||||
},
|
||||
imageBackground: {
|
||||
height: "100%",
|
||||
width: "100%",
|
||||
},
|
||||
|
||||
|
||||
// AUTHENTICATION
|
||||
authContainer: {
|
||||
flex: 1,
|
||||
justifyContent: "center",
|
||||
},
|
||||
authContainerTitle: {
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
// marginBottom: 50,
|
||||
},
|
||||
authTitle: {
|
||||
fontSize: 27,
|
||||
@@ -35,9 +37,19 @@ export const globalStyles = StyleSheet.create({
|
||||
color: MainColor.yellow,
|
||||
fontWeight: "bold",
|
||||
},
|
||||
|
||||
// TEXT & LABEL
|
||||
textLabel: {
|
||||
fontSize: 16,
|
||||
fontSize: 14,
|
||||
color: MainColor.white,
|
||||
fontWeight: "normal",
|
||||
},
|
||||
|
||||
// HOME
|
||||
homeContainer: {
|
||||
flex: 1,
|
||||
paddingInline: 25,
|
||||
paddingBlock: 10,
|
||||
backgroundColor: MainColor.darkblue,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -13,5 +13,5 @@
|
||||
"**/*.tsx",
|
||||
".expo/types/**/*.ts",
|
||||
"expo-env.d.ts"
|
||||
, "components/Button/ButtonCustom" ]
|
||||
, "components/_ShareComponent/Button/ButtonCustom" ]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user