Commit 8ffffaa4 authored by Lorenzo Trujillo Rojas's avatar Lorenzo Trujillo Rojas
Browse files

commit

parent 01de5e1a
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -4,11 +4,15 @@ import { useVerifyAccount } from "../hooks/useVerifyAccount";
import { ApiRequestStatus } from "../../common/const/api_request_states";
import { FullPageLoader } from "../../common/components/full_page_loader";
import { FloatingEndActionButton } from "../../common/components/floating_end_action_button";
import { useTranslation } from "react-i18next";
import { LANG_CONSTANTS } from "../../lang/lang";

export const VerifyScreen = () => {
  const { setValue, requestStatus, onSubmit, getNewResetCode } =
    useVerifyAccount();

  const { t } = useTranslation();

  if (requestStatus === ApiRequestStatus.LOADING) {
    return <FullPageLoader />;
  }
@@ -19,7 +23,10 @@ export const VerifyScreen = () => {
      contentContainerStyle={styles.innerContainer}
    >
      <CodeForm setValue={setValue} getNewResetCode={getNewResetCode} />
      <FloatingEndActionButton onPress={onSubmit} title="Verificar Cuenta" />
      <FloatingEndActionButton
        onPress={onSubmit}
        title={t(LANG_CONSTANTS.lastVerifyAccountLabel)}
      />
    </ScrollView>
  );
};
+4 −1
Original line number Diff line number Diff line
@@ -41,7 +41,10 @@ export default function ScanPage() {
    return (
      <View>
        <Text>{t(LANG_CONSTANTS.commonNoPermissions)}</Text>
        <Button title="Request permission" onPress={getPermission} />
        <Button
          title={t(LANG_CONSTANTS.lastRequestPermissionLabel)}
          onPress={getPermission}
        />
      </View>
    );
  }
+6 −0
Original line number Diff line number Diff line
@@ -157,5 +157,11 @@ export const ENGLISH_LANG: Lang = {
    downloadTheImage: "Download the image",
    numberOfActivities: "Number of activities",
    noTravels: "No travels",
    verifyAccountLabel: "Verify account",
    sendLabel: "Send",
    requestPermissionLabel: "Request permission",
    exitLabel: "Exit",
    downloadLabel: "Download",
    refreshLabel: "Refresh",
  },
};
+13 −1
Original line number Diff line number Diff line
@@ -153,6 +153,12 @@ export interface Lang {
    downloadTheImage: string;
    numberOfActivities: string;
    noTravels: string;
    verifyAccountLabel: string;
    sendLabel: string;
    requestPermissionLabel: string;
    exitLabel: string;
    downloadLabel: string;
    refreshLabel: string;
  };
}

@@ -220,7 +226,7 @@ export const LANG_CONSTANTS = {
  activityPointScreenDirectionsLabel: "activityPointScreen.directionsLabel",
  activityPointScreenNextActivityButton:
    "activityPointScreen.nextActivityButton",
  activityPointScreenActivitiesLabel: "activityPointScreen.activitiesLabel",
  activityInfoScreenActivitiesLabel: "activityInfoScreen.activitiesLabel",
  tabBarHomeLabel: "tabBar.homeLabel",
  tabBarTravelHistoryLabel: "tabBar.travelHistoryLabel",
  tabBarAccountLabel: "tabBar.accountLabel",
@@ -267,4 +273,10 @@ export const LANG_CONSTANTS = {
  lastDownloadTheImage: "last.downloadTheImage",
  lastNumberOfActivities: "last.numberOfActivities",
  lastNoTravels: "last.noTravels",
  lastVerifyAccountLabel: "last.verifyAccountLabel",
  lastSendLabel: "last.sendLabel",
  lastRequestPermissionLabel: "last.requestPermissionLabel",
  lastExitLabel: "last.exitLabel",
  lastDownloadLabel: "last.downloadLabel",
  lastRefreshLabel: "last.refreshLabel",
};
+6 −0
Original line number Diff line number Diff line
@@ -158,5 +158,11 @@ export const SPANISH_LANG: Lang = {
    downloadTheImage: "Descargar la imagen",
    numberOfActivities: "Número de actividades",
    noTravels: "No hay viajes",
    verifyAccountLabel: "Verificar cuenta",
    sendLabel: "Enviar",
    requestPermissionLabel: "Solicitar permiso",
    exitLabel: "Salir",
    downloadLabel: "Descargar",
    refreshLabel: "Refrescar",
  },
};
Loading