Compare commits
No commits in common. "drawer-menu" and "master" have entirely different histories.
drawer-men
...
master
@ -4,8 +4,7 @@ import { useTheme } from "react-native-paper";
|
|||||||
import Profile from "@/components/Profile";
|
import Profile from "@/components/Profile";
|
||||||
import Status from "@/components/Status";
|
import Status from "@/components/Status";
|
||||||
import TopNav from "@/components/TopNav";
|
import TopNav from "@/components/TopNav";
|
||||||
import DrawerMenu from "@/components/DrawerMenu";
|
import BottomNav from "@/components/BottomNav"
|
||||||
import Dialogs from "@/components/Dialogs";
|
|
||||||
import { useUser } from "@/context/UserContext";
|
import { useUser } from "@/context/UserContext";
|
||||||
import styles from "@/assets/styles";
|
import styles from "@/assets/styles";
|
||||||
import log from "@/util/log"
|
import log from "@/util/log"
|
||||||
@ -16,16 +15,6 @@ const Index = () => {
|
|||||||
const {
|
const {
|
||||||
isProfileActive,
|
isProfileActive,
|
||||||
setProfileActive,
|
setProfileActive,
|
||||||
isMenuActive,
|
|
||||||
setMenuActive,
|
|
||||||
setAboutActive,
|
|
||||||
isAboutActive,
|
|
||||||
setPrivacyActive,
|
|
||||||
isPrivacyActive,
|
|
||||||
setBugActive,
|
|
||||||
isBugActive,
|
|
||||||
setLocationActive,
|
|
||||||
isLocationActive,
|
|
||||||
userId,
|
userId,
|
||||||
userName,
|
userName,
|
||||||
setUserName,
|
setUserName,
|
||||||
@ -50,27 +39,8 @@ const Index = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={[styles.indexContainer, { backgroundColor: theme.colors.background }]}>
|
<View style={[styles.indexContainer, { backgroundColor: theme.colors.background }]}>
|
||||||
<DrawerMenu
|
|
||||||
isMenuActive={isMenuActive}
|
|
||||||
onClose={() => setMenuActive(false)}
|
|
||||||
toggleAbout={() => setAboutActive(!isAboutActive)}
|
|
||||||
togglePrivacy={() => setPrivacyActive(!isPrivacyActive)}
|
|
||||||
toggleBug={() => setBugActive(!isBugActive)}
|
|
||||||
toggleProfile={() => setProfileActive(true)}
|
|
||||||
toggleLocation={() => setLocationActive(true)}
|
|
||||||
/>
|
|
||||||
<Dialogs
|
|
||||||
aboutVisible={isAboutActive}
|
|
||||||
privacyVisible={isPrivacyActive}
|
|
||||||
bugVisible={isBugActive}
|
|
||||||
locationVisible={isLocationActive}
|
|
||||||
toggleAbout={() => setAboutActive(!isAboutActive)}
|
|
||||||
togglePrivacy={() => setPrivacyActive(!isPrivacyActive)}
|
|
||||||
toggleBug={() => setBugActive(!isBugActive)}
|
|
||||||
toggleLocation={() => setLocationActive(!isLocationActive)}
|
|
||||||
/>
|
|
||||||
<TopNav
|
<TopNav
|
||||||
toggleMenu={() => setMenuActive(!isMenuActive)}
|
toggleProfile={() => setProfileActive(true)}
|
||||||
/>
|
/>
|
||||||
<Status
|
<Status
|
||||||
id={userId}
|
id={userId}
|
||||||
@ -80,7 +50,6 @@ const Index = () => {
|
|||||||
setStatus={setUserStatus}
|
setStatus={setUserStatus}
|
||||||
currentTheme={currentTheme}
|
currentTheme={currentTheme}
|
||||||
isProfileActive={isProfileActive}
|
isProfileActive={isProfileActive}
|
||||||
isMenuActive={isMenuActive}
|
|
||||||
/>
|
/>
|
||||||
<Profile
|
<Profile
|
||||||
visible={isProfileActive}
|
visible={isProfileActive}
|
||||||
@ -94,6 +63,9 @@ const Index = () => {
|
|||||||
setChanged={setUserDataChanged}
|
setChanged={setUserDataChanged}
|
||||||
onClose={() => setProfileActive(false)}
|
onClose={() => setProfileActive(false)}
|
||||||
/>
|
/>
|
||||||
|
<BottomNav
|
||||||
|
isProfileActive={isProfileActive}
|
||||||
|
/>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -79,13 +79,7 @@ const styles = StyleSheet.create({
|
|||||||
//Nav
|
//Nav
|
||||||
logoContainer: { flex: 1, alignItems: "center" },
|
logoContainer: { flex: 1, alignItems: "center" },
|
||||||
logo: { width: 140, height: 70 },
|
logo: { width: 140, height: 70 },
|
||||||
topBar: {
|
topBar: { },
|
||||||
zIndex: 4,
|
|
||||||
flexDirection: "row",
|
|
||||||
justifyContent: "space-between",
|
|
||||||
width: "100%",
|
|
||||||
alignSelf: "stretch"
|
|
||||||
},
|
|
||||||
bottomBar: { height: 38 },
|
bottomBar: { height: 38 },
|
||||||
//index
|
//index
|
||||||
indexImageBackground: {
|
indexImageBackground: {
|
||||||
@ -96,30 +90,6 @@ const styles = StyleSheet.create({
|
|||||||
opacity: 0.3, // Fades the image
|
opacity: 0.3, // Fades the image
|
||||||
},
|
},
|
||||||
indexContainer: { flex: 1, alignItems: "stretch" },
|
indexContainer: { flex: 1, alignItems: "stretch" },
|
||||||
overlay: {
|
|
||||||
|
|
||||||
},
|
|
||||||
drawerContainer: {
|
|
||||||
...StyleSheet.absoluteFillObject,
|
|
||||||
marginTop: 0,
|
|
||||||
width: 200,
|
|
||||||
height: "auto",
|
|
||||||
//elevation: 4,
|
|
||||||
//backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
||||||
justifyContent: "flex-start",
|
|
||||||
alignItems: "flex-start",
|
|
||||||
zIndex: 5, // Ensures the drawer is above everything
|
|
||||||
elevation: 5, // Android shadow priority
|
|
||||||
//borderRadius: 10,
|
|
||||||
},
|
|
||||||
footer: {
|
|
||||||
padding: 16,
|
|
||||||
alignItems: "center",
|
|
||||||
},
|
|
||||||
closeText: {
|
|
||||||
color: "#6200ee",
|
|
||||||
fontWeight: "bold",
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default styles;
|
export default styles;
|
||||||
|
@ -2,19 +2,20 @@ import {Appbar, Portal, Button, Dialog, Text, useTheme } from "react-native-pape
|
|||||||
import { View } from "react-native";
|
import { View } from "react-native";
|
||||||
import styles from "@/assets/styles";
|
import styles from "@/assets/styles";
|
||||||
import React, {useState} from "react";
|
import React, {useState} from "react";
|
||||||
|
import Location from "@/components/Location";
|
||||||
import Broken from "@/components/Broken";
|
import Broken from "@/components/Broken";
|
||||||
|
|
||||||
|
|
||||||
interface BNProps {
|
interface BNProps {
|
||||||
isProfileActive: boolean;
|
isProfileActive: boolean;
|
||||||
isMenuActive: boolean;
|
|
||||||
}
|
}
|
||||||
|
const BottomNav: React.FC<BNProps> = ({ isProfileActive }) => {
|
||||||
const BottomNav: React.FC<BNProps> = ({ isProfileActive, isMenuActive }) => {
|
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const [menuVisible, setMenuVisible] = useState(false);
|
const [menuVisible, setMenuVisible] = useState(false);
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={ (isProfileActive || isMenuActive )&& { display: 'none' }}>
|
<View style={ isProfileActive && { display: 'none' }}>
|
||||||
<View style={{ backgroundColor: theme.colors.background }}>
|
<View style={{ backgroundColor: theme.colors.background }}>
|
||||||
<Appbar.Header style={[styles.bottomBar, { backgroundColor: theme.colors.primaryContainer }]} >
|
<Appbar.Header style={[styles.bottomBar, { backgroundColor: theme.colors.primaryContainer }]} >
|
||||||
<View style={{ alignItems: "center", flexDirection: "row", justifyContent: "space-between", padding: 10, flex: 1, paddingHorizontal: 15 }}>
|
<View style={{ alignItems: "center", flexDirection: "row", justifyContent: "space-between", padding: 10, flex: 1, paddingHorizontal: 15 }}>
|
||||||
|
@ -2,6 +2,8 @@ import { Title, useTheme } from "react-native-paper";
|
|||||||
import { Image, View } from "react-native";
|
import { Image, View } from "react-native";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const Broken = () => {
|
const Broken = () => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
return (
|
return (
|
||||||
|
@ -1,74 +0,0 @@
|
|||||||
import React from "react";
|
|
||||||
import { Portal, Button, Dialog, useTheme } from "react-native-paper";
|
|
||||||
import About from "@/components/About";
|
|
||||||
import Privacy from "@/components/Privacy";
|
|
||||||
import Broken from "@/components/Broken";
|
|
||||||
|
|
||||||
interface DialogsProps {
|
|
||||||
aboutVisible: boolean;
|
|
||||||
privacyVisible: boolean;
|
|
||||||
bugVisible: boolean;
|
|
||||||
locationVisible: boolean;
|
|
||||||
toggleAbout: () => void;
|
|
||||||
togglePrivacy: () => void;
|
|
||||||
toggleBug: () => void;
|
|
||||||
toggleLocation: () => void;
|
|
||||||
}
|
|
||||||
|
|
||||||
const Dialogs: React.FC<DialogsProps> = ({ aboutVisible, privacyVisible, bugVisible, locationVisible, toggleAbout, togglePrivacy, toggleBug, toggleLocation }) => {
|
|
||||||
const theme = useTheme();
|
|
||||||
return (
|
|
||||||
<Portal>
|
|
||||||
<Dialog visible={aboutVisible} onDismiss={() => toggleAbout()}
|
|
||||||
style={{backgroundColor: theme.colors.primaryContainer}}>
|
|
||||||
<Dialog.Title style={{color: theme.colors.primary, textAlign: 'center'}}>About Us</Dialog.Title>
|
|
||||||
<About/>
|
|
||||||
<Dialog.Actions style={{justifyContent: "center"}}>
|
|
||||||
<Button onPress={() => toggleAbout()} mode="contained"
|
|
||||||
style={{backgroundColor: theme.colors.inversePrimary}}
|
|
||||||
labelStyle={{color: theme.colors.primary}}>
|
|
||||||
Close
|
|
||||||
</Button>
|
|
||||||
</Dialog.Actions>
|
|
||||||
</Dialog>
|
|
||||||
<Dialog visible={privacyVisible} onDismiss={() => togglePrivacy()}
|
|
||||||
style={{backgroundColor: theme.colors.primaryContainer}}>
|
|
||||||
<Dialog.Title style={{color: theme.colors.primary, textAlign: 'center'}}>Privacy Policy</Dialog.Title>
|
|
||||||
<Privacy/>
|
|
||||||
<Dialog.Actions style={{justifyContent: "center"}}>
|
|
||||||
<Button onPress={() => togglePrivacy()} mode="contained"
|
|
||||||
style={{backgroundColor: theme.colors.inversePrimary}}
|
|
||||||
labelStyle={{color: theme.colors.primary}}>
|
|
||||||
Close
|
|
||||||
</Button>
|
|
||||||
</Dialog.Actions>
|
|
||||||
</Dialog>
|
|
||||||
<Dialog visible={bugVisible} onDismiss={() => toggleBug()}
|
|
||||||
style={{backgroundColor: theme.colors.primaryContainer}}>
|
|
||||||
<Dialog.Title style={{color: theme.colors.primary, textAlign: 'center'}}>Report A Bug</Dialog.Title>
|
|
||||||
<Broken/>
|
|
||||||
<Dialog.Actions style={{justifyContent: "center"}}>
|
|
||||||
<Button onPress={() => toggleBug()} mode="contained"
|
|
||||||
style={{backgroundColor: theme.colors.inversePrimary}}
|
|
||||||
labelStyle={{color: theme.colors.primary}}>
|
|
||||||
Close
|
|
||||||
</Button>
|
|
||||||
</Dialog.Actions>
|
|
||||||
</Dialog>
|
|
||||||
<Dialog visible={locationVisible} onDismiss={() => toggleLocation()}
|
|
||||||
style={{backgroundColor: theme.colors.primaryContainer}}>
|
|
||||||
<Dialog.Title style={{color: theme.colors.primary, textAlign: 'center'}}>Location</Dialog.Title>
|
|
||||||
<Broken/>
|
|
||||||
<Dialog.Actions style={{justifyContent: "center"}}>
|
|
||||||
<Button onPress={() => toggleLocation()} mode="contained"
|
|
||||||
style={{backgroundColor: theme.colors.inversePrimary}}
|
|
||||||
labelStyle={{color: theme.colors.primary}}>
|
|
||||||
Close
|
|
||||||
</Button>
|
|
||||||
</Dialog.Actions>
|
|
||||||
</Dialog>
|
|
||||||
</Portal>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Dialogs;
|
|
@ -1,37 +0,0 @@
|
|||||||
import React from "react";
|
|
||||||
import { View } from "react-native";
|
|
||||||
import { Appbar,Drawer, useTheme } from "react-native-paper";
|
|
||||||
import styles from "@/assets/styles";
|
|
||||||
|
|
||||||
interface DrawerMenuProps {
|
|
||||||
isMenuActive: boolean;
|
|
||||||
onClose: () => void;
|
|
||||||
toggleAbout: () => void;
|
|
||||||
togglePrivacy: () => void;
|
|
||||||
toggleBug: () => void;
|
|
||||||
toggleProfile: () => void;
|
|
||||||
toggleLocation: () => void;
|
|
||||||
}
|
|
||||||
|
|
||||||
const DrawerMenu: React.FC<DrawerMenuProps> = ({ isMenuActive, onClose, toggleAbout, togglePrivacy, toggleBug, toggleProfile, toggleLocation }) => {
|
|
||||||
const theme = useTheme();
|
|
||||||
if (!isMenuActive) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return (
|
|
||||||
<View style={[styles.drawerContainer, { backgroundColor: theme.colors.background }]}>
|
|
||||||
<Appbar.BackAction onPress={() => onClose()} />
|
|
||||||
<Drawer.Section>
|
|
||||||
<Drawer.Item label="Profile" onPress={() => { toggleProfile(); onClose(); }} />
|
|
||||||
<Drawer.Item label="Location" onPress={() => { toggleLocation(); onClose(); }} />
|
|
||||||
</Drawer.Section>
|
|
||||||
<Drawer.Section showDivider={false}>
|
|
||||||
<Drawer.Item label="About Us" onPress={() => { toggleAbout(); onClose(); }} />
|
|
||||||
<Drawer.Item label="Privacy Policy" onPress={() => { togglePrivacy(); onClose(); }} />
|
|
||||||
<Drawer.Item label="Report a Bug" onPress={() => { toggleBug(); onClose(); }} />
|
|
||||||
</Drawer.Section>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default DrawerMenu;
|
|
@ -2,7 +2,7 @@ import React, { useEffect, useState, useRef } from "react";
|
|||||||
import useWebSocket from "react-use-websocket";
|
import useWebSocket from "react-use-websocket";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import {Animated, Easing, ImageBackground, ScrollView, useColorScheme, View} from "react-native";
|
import {Animated, Easing, ImageBackground, ScrollView, useColorScheme, View} from "react-native";
|
||||||
import { Avatar, List, Button, useTheme } from "react-native-paper";
|
import { Avatar, List, Button, useTheme, } from "react-native-paper";
|
||||||
import themes from "@/assets/themes";
|
import themes from "@/assets/themes";
|
||||||
import styles from "@/assets/styles";
|
import styles from "@/assets/styles";
|
||||||
import log from "@/util/log"
|
import log from "@/util/log"
|
||||||
@ -27,10 +27,9 @@ interface StatusProps {
|
|||||||
setStatus: (currentStatus: string) => void;
|
setStatus: (currentStatus: string) => void;
|
||||||
currentTheme: string;
|
currentTheme: string;
|
||||||
isProfileActive: boolean;
|
isProfileActive: boolean;
|
||||||
isMenuActive: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const Status: React.FC<StatusProps> = ({ id, name, image, currentStatus, setStatus, currentTheme, isProfileActive, isMenuActive }) => {
|
const Status: React.FC<StatusProps> = ({ id, name, image, currentStatus, setStatus, currentTheme, isProfileActive }) => {
|
||||||
log.debug("WebSocket URL: ", WS_URL);
|
log.debug("WebSocket URL: ", WS_URL);
|
||||||
log.debug("API URL: ", API_URL);
|
log.debug("API URL: ", API_URL);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
@ -210,7 +209,6 @@ const Status: React.FC<StatusProps> = ({ id, name, image, currentStatus, setStat
|
|||||||
<View style={styles.buttonContainer}>
|
<View style={styles.buttonContainer}>
|
||||||
<Button
|
<Button
|
||||||
mode="contained"
|
mode="contained"
|
||||||
disabled={isMenuActive}
|
|
||||||
onPress={() => handleStatusPress("On the Way")}
|
onPress={() => handleStatusPress("On the Way")}
|
||||||
style={[
|
style={[
|
||||||
styles.actionButton,
|
styles.actionButton,
|
||||||
@ -221,7 +219,6 @@ const Status: React.FC<StatusProps> = ({ id, name, image, currentStatus, setStat
|
|||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
mode="contained"
|
mode="contained"
|
||||||
disabled={isMenuActive}
|
|
||||||
onPress={() => handleStatusPress("Arrived")}
|
onPress={() => handleStatusPress("Arrived")}
|
||||||
style={[
|
style={[
|
||||||
styles.actionButton,
|
styles.actionButton,
|
||||||
|
@ -1,18 +1,34 @@
|
|||||||
import { Appbar, useTheme } from "react-native-paper";
|
import {Appbar, Portal, Button, Dialog, Menu, useTheme} from "react-native-paper";
|
||||||
import {Image, useColorScheme, View} from "react-native";
|
import {Image, useColorScheme, View} from "react-native";
|
||||||
import React from "react";
|
import React, {useState} from "react";
|
||||||
import styles from "@/assets/styles";
|
import styles from "@/assets/styles";
|
||||||
|
import About from "@/components/About";
|
||||||
|
import Privacy from "@/components/Privacy";
|
||||||
|
import Broken from "@/components/Broken";
|
||||||
|
|
||||||
const TopNav = ({ toggleMenu }: { toggleMenu: () => void; }) => {
|
const TopNav = ({ toggleProfile }: { toggleProfile: () => void; }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const colorScheme = useColorScheme();
|
const colorScheme = useColorScheme();
|
||||||
|
const [aboutVisible, setAboutVisible] = useState(false);
|
||||||
|
const [privacyVisible, setPrivacyVisible] = useState(false);
|
||||||
|
const [bugVisible, setBugVisible] = useState(false);
|
||||||
|
const [menuVisible, setMenuVisible] = useState(false);
|
||||||
|
const [menuAnchor, setMenuAnchor] = useState<{ x: number; y: number } | null>(null);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={{ backgroundColor: theme.colors.background }}>
|
<View style={{ backgroundColor: theme.colors.background }}>
|
||||||
<Appbar.Header style={[styles.topBar, { backgroundColor: theme.colors.primaryContainer }]}>
|
<Appbar.Header style={[styles.topBar, { backgroundColor: theme.colors.primaryContainer }]}>
|
||||||
<View>
|
<View>
|
||||||
|
<Menu visible={menuVisible} onDismiss={() => setMenuVisible(false)} anchor={menuAnchor} style={{ backgroundColor: theme.colors.primaryContainer }}>
|
||||||
|
<Menu.Item onPress={() => { setMenuVisible(false); setAboutVisible(true);}} title="About Us" style={{ backgroundColor: theme.colors.primaryContainer }}/>
|
||||||
|
<Menu.Item onPress={() => { setMenuVisible(false); setPrivacyVisible(true);}} title="Privacy Policy" style={{ backgroundColor: theme.colors.primaryContainer }}/>
|
||||||
|
<Menu.Item onPress={() => { setMenuVisible(false); setBugVisible(true);}} title="Report a Bug" style={{ backgroundColor: theme.colors.primaryContainer }}/>
|
||||||
|
</Menu>
|
||||||
<Appbar.Action icon="menu"
|
<Appbar.Action icon="menu"
|
||||||
onPress={toggleMenu}
|
onPressIn={(event) => {
|
||||||
|
setMenuAnchor({ x: event.nativeEvent.pageX, y: event.nativeEvent.pageY + 40 });
|
||||||
|
setMenuVisible(true);
|
||||||
|
}}
|
||||||
iconColor={theme.colors.primary} />
|
iconColor={theme.colors.primary} />
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.logoContainer} >
|
<View style={styles.logoContainer} >
|
||||||
@ -21,8 +37,37 @@ const TopNav = ({ toggleMenu }: { toggleMenu: () => void; }) => {
|
|||||||
require("../assets/images/pogdark_logo_inverse.png") : require("../assets/images/pogdark_logo.png")
|
require("../assets/images/pogdark_logo_inverse.png") : require("../assets/images/pogdark_logo.png")
|
||||||
} style={styles.logo} resizeMode={"contain"} />
|
} style={styles.logo} resizeMode={"contain"} />
|
||||||
</View>
|
</View>
|
||||||
<Appbar.Action icon="pencil" color={ theme.colors.primaryContainer } />
|
<Appbar.Action icon="pencil" onPress={toggleProfile} iconColor={ theme.colors.primary } />
|
||||||
</Appbar.Header>
|
</Appbar.Header>
|
||||||
|
<Portal>
|
||||||
|
<Dialog visible={aboutVisible} onDismiss={() => setAboutVisible(false)} style={{ backgroundColor: theme.colors.primaryContainer }}>
|
||||||
|
<Dialog.Title style={{ color: theme.colors.primary, textAlign: 'center' }}>About Us</Dialog.Title>
|
||||||
|
<About />
|
||||||
|
<Dialog.Actions style={{ justifyContent: "center" }}>
|
||||||
|
<Button onPress={() => setAboutVisible(false)} mode="contained" style={{ backgroundColor: theme.colors.inversePrimary }} labelStyle={{ color: theme.colors.primary }}>
|
||||||
|
Close
|
||||||
|
</Button>
|
||||||
|
</Dialog.Actions>
|
||||||
|
</Dialog>
|
||||||
|
<Dialog visible={privacyVisible} onDismiss={() => setPrivacyVisible(false)} style={{ backgroundColor: theme.colors.primaryContainer }}>
|
||||||
|
<Dialog.Title style={{ color: theme.colors.primary, textAlign: 'center' }}>Privacy Policy</Dialog.Title>
|
||||||
|
<Privacy />
|
||||||
|
<Dialog.Actions style={{ justifyContent: "center" }}>
|
||||||
|
<Button onPress={() => setPrivacyVisible(false)} mode="contained" style={{ backgroundColor: theme.colors.inversePrimary }} labelStyle={{ color: theme.colors.primary }}>
|
||||||
|
Close
|
||||||
|
</Button>
|
||||||
|
</Dialog.Actions>
|
||||||
|
</Dialog>
|
||||||
|
<Dialog visible={bugVisible} onDismiss={() => setBugVisible(false)} style={{ backgroundColor: theme.colors.primaryContainer }}>
|
||||||
|
<Dialog.Title style={{ color: theme.colors.primary, textAlign: 'center' }}>Report A Bug</Dialog.Title>
|
||||||
|
<Broken />
|
||||||
|
<Dialog.Actions style={{ justifyContent: "center" }}>
|
||||||
|
<Button onPress={() => setBugVisible(false)} mode="contained" style={{ backgroundColor: theme.colors.inversePrimary }} labelStyle={{ color: theme.colors.primary }}>
|
||||||
|
Close
|
||||||
|
</Button>
|
||||||
|
</Dialog.Actions>
|
||||||
|
</Dialog>
|
||||||
|
</Portal>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -11,16 +11,6 @@ export const API_URL = process.env.EXPO_PUBLIC_API_URL;
|
|||||||
interface UserContextType {
|
interface UserContextType {
|
||||||
isProfileActive: boolean;
|
isProfileActive: boolean;
|
||||||
setProfileActive: (active: boolean) => void;
|
setProfileActive: (active: boolean) => void;
|
||||||
isMenuActive: boolean;
|
|
||||||
setMenuActive: (active: boolean) => void;
|
|
||||||
isAboutActive: boolean;
|
|
||||||
setAboutActive: (active: boolean) => void;
|
|
||||||
isPrivacyActive: boolean;
|
|
||||||
setPrivacyActive: (active: boolean) => void;
|
|
||||||
isBugActive: boolean;
|
|
||||||
setBugActive: (active: boolean) => void;
|
|
||||||
isLocationActive: boolean;
|
|
||||||
setLocationActive: (active: boolean) => void;
|
|
||||||
userId: string;
|
userId: string;
|
||||||
userName: string;
|
userName: string;
|
||||||
setUserName: (name: string) => void;
|
setUserName: (name: string) => void;
|
||||||
@ -44,11 +34,6 @@ interface UserProviderProps {
|
|||||||
|
|
||||||
export const UserProvider: React.FC<UserProviderProps> = ({ children }) => {
|
export const UserProvider: React.FC<UserProviderProps> = ({ children }) => {
|
||||||
const [isProfileActive, setProfileActive] = useState(false);
|
const [isProfileActive, setProfileActive] = useState(false);
|
||||||
const [isMenuActive, setMenuActive] = useState(false);
|
|
||||||
const [isAboutActive, setAboutActive] = useState(false);
|
|
||||||
const [isPrivacyActive, setPrivacyActive] = useState(false);
|
|
||||||
const [isBugActive, setBugActive] = useState(false);
|
|
||||||
const [isLocationActive, setLocationActive] = useState(false);
|
|
||||||
const [userId, setUserId] = useState("");
|
const [userId, setUserId] = useState("");
|
||||||
const [userName, setUserName] = useState("");
|
const [userName, setUserName] = useState("");
|
||||||
const [userImage, setUserImage] = useState("");
|
const [userImage, setUserImage] = useState("");
|
||||||
@ -145,16 +130,6 @@ export const UserProvider: React.FC<UserProviderProps> = ({ children }) => {
|
|||||||
value={{
|
value={{
|
||||||
isProfileActive,
|
isProfileActive,
|
||||||
setProfileActive,
|
setProfileActive,
|
||||||
isMenuActive,
|
|
||||||
setMenuActive,
|
|
||||||
isAboutActive,
|
|
||||||
setAboutActive,
|
|
||||||
isPrivacyActive,
|
|
||||||
setPrivacyActive,
|
|
||||||
isBugActive,
|
|
||||||
setBugActive,
|
|
||||||
isLocationActive,
|
|
||||||
setLocationActive,
|
|
||||||
userId,
|
userId,
|
||||||
userName,
|
userName,
|
||||||
setUserName,
|
setUserName,
|
||||||
|
Loading…
Reference in New Issue
Block a user