Skip to content

[BUG] 某些情況下直接查閱報表不會跳出提示訊息 #9

@KageRyo

Description

@KageRyo

經測試後發現,某些情況第一次開啟時直接點及查閱報表沒有如以下程式碼之效果

const BtnSection = ({ navigation }) => {
  const handlePress = async (route) => {
    if (route === 'Result') {
      const data = await AsyncStorage.getItem('waterQualityData');
      if (data === null) {
        Alert.alert('提示', '請先至「輸入資料」頁面填寫您的水質資料。');
      } else {
        navigation.navigate(route, { data: JSON.parse(data) });
      }
    } else if (route.startsWith('http')) {
      Linking.openURL(route);
    } else {
      navigation.navigate(route);
    }
  };

顯示彈跳視窗,而是直接產生錯誤。

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions