Compare commits
No commits in common. "master" and "master-ebaef46456" have entirely different histories.
master
...
master-eba
@ -63,9 +63,7 @@ const Index = () => {
|
|||||||
setChanged={setUserDataChanged}
|
setChanged={setUserDataChanged}
|
||||||
onClose={() => setProfileActive(false)}
|
onClose={() => setProfileActive(false)}
|
||||||
/>
|
/>
|
||||||
<BottomNav
|
<BottomNav toggleLocation={() => setProfileActive(true)}/>
|
||||||
isProfileActive={isProfileActive}
|
|
||||||
/>
|
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -1,46 +1,24 @@
|
|||||||
import {Appbar, Portal, Button, Dialog, Text, useTheme } from "react-native-paper";
|
import {Appbar, Button, Text, useTheme} from "react-native-paper";
|
||||||
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 from "react";
|
||||||
import Location from "@/components/Location";
|
|
||||||
import Broken from "@/components/Broken";
|
|
||||||
|
|
||||||
|
const BottomNav = ({ toggleLocation }: { toggleLocation: () => void; }) => {
|
||||||
interface BNProps {
|
|
||||||
isProfileActive: boolean;
|
|
||||||
}
|
|
||||||
const BottomNav: React.FC<BNProps> = ({ isProfileActive }) => {
|
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const [menuVisible, setMenuVisible] = useState(false);
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<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 }}>
|
<Text style={{ color: theme.colors.primary, fontFamily: "SpaceReg" }}>Daisy Knight Dog Park</Text>
|
||||||
<Text style={{ color: theme.colors.primary, fontFamily: "SpaceReg" }}>Daisy Knight Dog Park</Text>
|
<Button
|
||||||
<Button
|
mode="text"
|
||||||
mode="text"
|
onPress={() => toggleLocation }
|
||||||
onPress={() => setMenuVisible(true) }
|
style={{ backgroundColor: theme.colors.primary, height: styles.bottomBar.height/2, justifyContent: "center"}}
|
||||||
style={{ backgroundColor: theme.colors.primary, height: styles.bottomBar.height/2, justifyContent: "center"}}
|
labelStyle={{ color: theme.colors.onPrimary, fontFamily: "SpaceReg"}}>
|
||||||
labelStyle={{ color: theme.colors.onPrimary, fontFamily: "SpaceReg"}}>
|
Change
|
||||||
Change
|
</Button>
|
||||||
</Button>
|
</View>
|
||||||
</View>
|
</Appbar.Header>
|
||||||
</Appbar.Header>
|
|
||||||
<Portal>
|
|
||||||
<Dialog visible={menuVisible} onDismiss={() => setMenuVisible(false)} style={{ backgroundColor: theme.colors.primaryContainer, maxHeight: 400 }}>
|
|
||||||
<Dialog.Title style={{ color: theme.colors.primary, textAlign: 'center' }}>Location</Dialog.Title>
|
|
||||||
<Broken />
|
|
||||||
<Dialog.Actions style={{ justifyContent: "center" }}>
|
|
||||||
<Button onPress={() => setMenuVisible(false)} mode="contained" style={{ backgroundColor: theme.colors.inversePrimary }} labelStyle={{ color: theme.colors.primary }}>
|
|
||||||
Close
|
|
||||||
</Button>
|
|
||||||
</Dialog.Actions>
|
|
||||||
</Dialog>
|
|
||||||
</Portal>
|
|
||||||
</View>
|
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,20 +1,19 @@
|
|||||||
import {Title, useTheme} from "react-native-paper";
|
import {Dialog, useTheme} from "react-native-paper";
|
||||||
import { Image, View } from "react-native";
|
import { Image } from "react-native";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
const theme = useTheme();
|
||||||
|
|
||||||
const Broken = () => {
|
const Broken = () => {
|
||||||
const theme = useTheme();
|
|
||||||
return (
|
return (
|
||||||
<View>
|
<Dialog.Content>
|
||||||
<Title style={{color: theme.colors.onBackground, fontSize: 16, textAlign: 'center', fontFamily: "Light"}}>The Internet is a Series of Tubes</Title>
|
<Dialog.Title style={{color: theme.colors.onBackground, fontSize: 16, textAlign: 'center', fontFamily: "Light"}}>The Internet is a Series of Tubes</Dialog.Title>
|
||||||
<Image
|
<Image
|
||||||
source={require("../assets/images/broken.png")}
|
source={require("../assets/images/broken.png")}
|
||||||
style={{ alignSelf: 'center', resizeMode: "contain", height: 400/3 }}
|
style={{ alignSelf: 'center', width: "90%" }}
|
||||||
/>
|
/>
|
||||||
<Title style={{color: theme.colors.onBackground, fontSize: 16, textAlign: 'center', fontFamily: "Light"}}>And these aren't connected. {"\n"} (We're still working on this part.)</Title>
|
<Dialog.Title style={{color: theme.colors.onBackground, fontSize: 16, textAlign: 'center', fontFamily: "Light"}}>And these aren't connected. {"\n"} (We're still working on this part.)</Dialog.Title>
|
||||||
</View>
|
</Dialog.Content>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,9 +1,22 @@
|
|||||||
import React from "react";
|
import { Dialog, Portal } from "react-native-paper";
|
||||||
|
import React, {useEffect} from "react";
|
||||||
import Broken from "@/components/Broken";
|
import Broken from "@/components/Broken";
|
||||||
|
|
||||||
const Location = () => {
|
interface LocationProps {
|
||||||
|
visible: boolean;
|
||||||
|
}
|
||||||
|
const Location: React.FC<LocationProps> = ({ visible }) => {
|
||||||
|
useEffect(() => {
|
||||||
|
if (visible) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}, [visible]);
|
||||||
return (
|
return (
|
||||||
<Broken />
|
<Portal>
|
||||||
|
<Dialog visible={visible} >
|
||||||
|
<Broken />
|
||||||
|
</Dialog>
|
||||||
|
</Portal>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ const TopNav = ({ toggleProfile }: { toggleProfile: () => void; }) => {
|
|||||||
</Dialog.Actions>
|
</Dialog.Actions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
<Dialog visible={bugVisible} onDismiss={() => setBugVisible(false)} style={{ backgroundColor: theme.colors.primaryContainer }}>
|
<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>
|
<Dialog.Title style={{ color: theme.colors.primary, textAlign: 'center' }}>Privacy Policy</Dialog.Title>
|
||||||
<Broken />
|
<Broken />
|
||||||
<Dialog.Actions style={{ justifyContent: "center" }}>
|
<Dialog.Actions style={{ justifyContent: "center" }}>
|
||||||
<Button onPress={() => setBugVisible(false)} mode="contained" style={{ backgroundColor: theme.colors.inversePrimary }} labelStyle={{ color: theme.colors.primary }}>
|
<Button onPress={() => setBugVisible(false)} mode="contained" style={{ backgroundColor: theme.colors.inversePrimary }} labelStyle={{ color: theme.colors.primary }}>
|
||||||
|
Loading…
Reference in New Issue
Block a user