Skip to content

Commit

Permalink
Fix: show 'noEvent' text if there is no event today
Browse files Browse the repository at this point in the history
  • Loading branch information
mori8 committed Jun 3, 2022
1 parent b2c3305 commit 1f89f9a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
15 changes: 8 additions & 7 deletions react-native/screens/HomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ export default function HomeScreen({ navigation }: Navigation) {
const auth = useAuth();

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

navigation.setOptions({
headerRight: () => <HomeMenu />,
Expand Down Expand Up @@ -176,11 +176,12 @@ export default function HomeScreen({ navigation }: Navigation) {
fontStyle="normal"
fontSize="xl"
lineHeight={60}
>
{i18n.t("eventCount_1") +
>{
events.event_num === 0 ? i18n.t("noEvent") :
i18n.t("eventCount_1") +
events.event_num +
i18n.t("eventCount_2")}
</Text>
i18n.t("eventCount_2")
}</Text>
<View style={styles.childButtonWrapper}>
<TouchableOpacity
key={"n_all"}
Expand Down
6 changes: 3 additions & 3 deletions react-native/screens/IntroductionScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export default function HomeScreen({ navigation }: Navigation) {
});
const auth = useAuth();

useEffect(() => {
navigation.navigate("Home");
})
// useEffect(() => {
// navigation.navigate("Home");
// })

useEffect(() => {
if (response?.type === "success") {
Expand Down

0 comments on commit 1f89f9a

Please sign in to comment.