Commit 7e160f31 authored by Lorenzo Trujillo Rojas's avatar Lorenzo Trujillo Rojas
Browse files

commit

parent 986b5f9f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -46,7 +46,11 @@ const MainLayout = () => {
  }, [isLoading, profileLoading]);

  if (isLoading || profileLoading) {
    return <ActivityIndicator />;
    return (
      <ActivityIndicator
        color={isLoading ? "red" : profileLoading ? "blue" : "green"}
      />
    );
  }

  return (
+6 −3
Original line number Diff line number Diff line
@@ -2,8 +2,11 @@ import { router, Stack } from "expo-router";
import { LIGHT_THEME } from "../../src/common/const/theme";
import { Button } from "react-native";
import { ShareButton } from "../../src/travel/components/share_button";
import { useTranslation } from "react-i18next";
import { LANG_CONSTANTS } from "../../src/lang/lang";

export default function Layout() {
  const { t } = useTranslation();
  return (
    <Stack
      screenOptions={{
@@ -20,21 +23,21 @@ export default function Layout() {
      <Stack.Screen
        name="details/[id]"
        options={{
          title: "Travel Details",
          title: t(LANG_CONSTANTS.lastTravelDetails),
        }}
      />

      <Stack.Screen
        name="active/[id]"
        options={{
          title: "Your activities",
          title: t(LANG_CONSTANTS.lastYourActivities),
        }}
      />

      <Stack.Screen
        name="download/[id]"
        options={{
          title: "Download Travel",
          title: t(LANG_CONSTANTS.lastDownloadTravel),
        }}
      />
      <Stack.Screen
+3 −1
Original line number Diff line number Diff line
@@ -53,7 +53,9 @@ const getProductionContext = (language: string): DataContextType => {
      new StateDataSourceProd(language)
    ),
    authRepository: new AuthRepositoryImpl(new AuthDatasourceProd()),
    activityRepository: new ActivityRepositoryDev(new ActivityDatasourceProd()),
    activityRepository: new ActivityRepositoryDev(
      new ActivityDatasourceProd(language)
    ),
    travelRepository: new TravelRepositoryImpl(new TravelDatasourceProd()),
    routeRepository: new RouteRepositoryImpl(new RouteDatasourceProd(language)),
    profileRepository: new ProfileRepositoryImpl(
+3 −0
Original line number Diff line number Diff line
@@ -163,5 +163,8 @@ export const ENGLISH_LANG: Lang = {
    exitLabel: "Exit",
    downloadLabel: "Download",
    refreshLabel: "Refresh",
    yourActivities: "Your activities",
    downloadTravel: "Download travel",
    travelDetails: "Travel details",
  },
};
+6 −0
Original line number Diff line number Diff line
@@ -159,6 +159,9 @@ export interface Lang {
    exitLabel: string;
    downloadLabel: string;
    refreshLabel: string;
    yourActivities: string;
    travelDetails: string;
    downloadTravel: string;
  };
}

@@ -279,4 +282,7 @@ export const LANG_CONSTANTS = {
  lastExitLabel: "last.exitLabel",
  lastDownloadLabel: "last.downloadLabel",
  lastRefreshLabel: "last.refreshLabel",
  lastYourActivities: "last.yourActivities",
  lastTravelDetails: "last.travelDetails",
  lastDownloadTravel: "last.downloadTravel",
};
Loading