mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2024-11-17 06:19:25 +08:00
Polished animated container and homepage
This commit is contained in:
parent
8ffb359604
commit
96df2f2f05
3 changed files with 31 additions and 19 deletions
|
@ -9,22 +9,34 @@ export interface props {
|
||||||
|
|
||||||
export default function AnimatedContainer(props: props) {
|
export default function AnimatedContainer(props: props) {
|
||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
|
||||||
<MotiScrollView
|
<MotiScrollView
|
||||||
from={{
|
contentContainerStyle={{
|
||||||
opacity: 0,
|
alignItems: "center",
|
||||||
backgroundColor: colors.orange_1,
|
alignSelf: "center",
|
||||||
|
justifyContent: "flex-start",
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
flex: 1,
|
flex: 1,
|
||||||
}}
|
}}
|
||||||
|
from={{
|
||||||
|
borderRadius: 0,
|
||||||
|
backgroundColor: colors.orange_2,
|
||||||
|
paddingTop: 4,
|
||||||
|
paddingBottom: 4,
|
||||||
|
marginHorizontal: "4%",
|
||||||
|
marginVertical: "5%",
|
||||||
|
}}
|
||||||
animate={{
|
animate={{
|
||||||
opacity: 1,
|
borderRadius: 15,
|
||||||
backgroundColor: colors.blue_2,
|
backgroundColor: colors.blue_2,
|
||||||
flex: 1,
|
paddingTop: 16,
|
||||||
|
paddingBottom: 16,
|
||||||
|
marginHorizontal: "4%",
|
||||||
|
marginVertical: "5%",
|
||||||
}}
|
}}
|
||||||
transition={{ type: "timing", duration: 300 }}
|
transition={{ type: "timing", duration: 300 }}
|
||||||
>
|
>
|
||||||
{props.children}
|
{props.children}
|
||||||
</MotiScrollView>
|
</MotiScrollView>
|
||||||
</View>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ export default function Home() {
|
||||||
};
|
};
|
||||||
function CustomMap() {
|
function CustomMap() {
|
||||||
if (dist !== null && location !== null) {
|
if (dist !== null && location !== null) {
|
||||||
if (dist <= 1) {
|
if (dist >= 1) {
|
||||||
// Just switch this condition for map debugging
|
// Just switch this condition for map debugging
|
||||||
return <MapView style={styles.map} initialRegion={ustpCoords} />;
|
return <MapView style={styles.map} initialRegion={ustpCoords} />;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -39,7 +39,7 @@ const styles = StyleSheet.create({
|
||||||
marginVertical: "5%",
|
marginVertical: "5%",
|
||||||
width: "92%",
|
width: "92%",
|
||||||
borderRadius: 15,
|
borderRadius: 15,
|
||||||
backgroundColor: colors.blue_2,
|
// backgroundColor: colors.blue_2,
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
alignSelf: "center",
|
alignSelf: "center",
|
||||||
paddingTop: 32,
|
paddingTop: 32,
|
||||||
|
|
Loading…
Reference in a new issue