message: feat: add a reset-cache button on errors
diff: @@ -13,24 +13,23 @@ import { SafeAreaView } from "react-native-safe-area-context"
  import { isIos } from "@app/utils/helper"
  import { offsets, presets } from "@app/components/screen/screen.presets"
  import crashlytics from "@react-native-firebase/crashlytics"
  +import AsyncStorage from "@react-native-async-storage/async-storage"
  +import useLogout from "@app/hooks/use-logout"
  const styles = EStyleSheet.create({
  $color: palette.white,
  $paddingHorizontal: "20rem",
  $textAlign: "center",
  -
  buttonContainer: {
  alignSelf: "center",
  - marginVertical: 12,
  - paddingBottom: 48,
  - width: "60%",
  + marginVertical: 7,
  + paddingBottom: 21,
  + width: "75%",
  },
  -
  buttonStyle: {
  backgroundColor: palette.white,
  borderRadius: 24,
  },
  -
  buttonTitle: {
  color: color.primary,
  fontWeight: "bold",
  @@ -59,7 +58,15 @@ const styles = EStyleSheet.create({
  },
  })
  export const ErrorScreen = ({ error, resetError }) => {
  + const { logout } = useLogout()
  useEffect(() => crashlytics().recordError(error), [error])
  +
  + const resetApp = async () => {
  + await logout()
  + await AsyncStorage.removeItem("apollo-cache-persist")
  + resetError()
  + }
  +
  return (
  <KeyboardAvoidingView
  style={[presets.fixed.outer, { backgroundColor: palette.lightBlue }]}
  @@ -93,9 +100,14 @@ export const ErrorScreen = ({ error, resetError }) => {
  />
  <Button
  title={translate("common.tryAgain")}
  - onPress={() => {
  - resetError()
  - }}
  + onPress={() => resetError()}
  + containerStyle={styles.buttonContainer}
  + buttonStyle={styles.buttonStyle}
  + titleStyle={styles.buttonTitle}
  + />
  + <Button
  + title={translate("Clear App Cache and Logout")}
  + onPress={() => resetApp()}
  containerStyle={styles.buttonContainer}
  buttonStyle={styles.buttonStyle}
  titleStyle={styles.buttonTitle}
  