Skip to content

Commit

Permalink
Merge pull request #109 from dsc-sookmyung/feature/home
Browse files Browse the repository at this point in the history
[#108] Feature/home
  • Loading branch information
hee-suh authored Aug 14, 2022
2 parents 59984b8 + e91c095 commit 92cb166
Show file tree
Hide file tree
Showing 4 changed files with 350 additions and 305 deletions.
1 change: 1 addition & 0 deletions react-native/components/Home/HomeMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default function HomeMenu() {
return (
<Menu
visible={isMenuVisible}
style={{ marginTop: 32 }}
anchor={
<TouchableOpacity onPress={showMenu}>
<Image
Expand Down
19 changes: 11 additions & 8 deletions react-native/screens/HomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function HomeScreen({ navigation }: Navigation) {
cid: 1,
cname: "Soo",
cprofileImg: 2,
events: ["the 17th Graduate Seremony", "Do-Dream Festival", "asdfasf"],
events: ["the 17th Graduate Seremony", "Do-Dream Festival", "asdfasf", "소풍"],
},
{
cid: 2,
Expand Down Expand Up @@ -75,7 +75,7 @@ export default function HomeScreen({ navigation }: Navigation) {

useEffect(() => {
if (auth?.userData) {
setUser(auth?.userData);
setUser(auth?.userData);
}

navigation.setOptions({
Expand Down Expand Up @@ -118,7 +118,7 @@ export default function HomeScreen({ navigation }: Navigation) {
<ImageBackground
source={require("../assets/images/home-button-background.png")}
style={[styles.functionButtonImageBackground]}
imageStyle={{marginTop: -40}}
imageStyle={{ marginTop: -40 }}
>
<View style={styles.functionButtonWrapper}>
<TouchableOpacity
Expand Down Expand Up @@ -239,7 +239,7 @@ export default function HomeScreen({ navigation }: Navigation) {
</TouchableOpacity>
))}
</ScrollView>
<View style={styles.todayNoticeWrapper}>
<ScrollView style={styles.todayNoticeWrapper}>
{nowSelectedChildId === SHOW_ALL ? (
events?.children.reduce(
(prevValue, child) => prevValue + child.events.length,
Expand All @@ -248,7 +248,10 @@ export default function HomeScreen({ navigation }: Navigation) {
events?.children.map((notice, index) =>
notice.events.map((event, index) => {
return (
<View key={"n_" + index} style={[styles.pinkButton, { flexDirection: "row" }]}>
<View
key={"n_" + index}
style={[styles.pinkButton, { flexDirection: "row" }]}
>
<MaterialIcons
name="event"
size={20}
Expand Down Expand Up @@ -300,7 +303,7 @@ export default function HomeScreen({ navigation }: Navigation) {
) : (
<NoEventBox />
)}
</View>
</ScrollView>
</View>
</SafeAreaView>
)}
Expand Down Expand Up @@ -353,7 +356,7 @@ const styles = StyleSheet.create({
shadowOffset: {
height: 0,
width: 0,
}
},
},
childButtonWrapper: {
flexDirection: "row",
Expand Down Expand Up @@ -436,7 +439,7 @@ const styles = StyleSheet.create({
pinkButton: {
backgroundColor: theme.colors.secondary,
borderRadius: 12,
padding: 16,
padding: 12,
marginBottom: 12,
width: "100%",
},
Expand Down
Loading

0 comments on commit 92cb166

Please sign in to comment.