aboutsummaryrefslogtreecommitdiff
path: root/src/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/app/api/schema.ts5
-rw-r--r--src/frontend/app/components/arrivals/ArrivalList.tsx5
-rw-r--r--src/frontend/app/contexts/JourneyContext.tsx8
-rw-r--r--src/frontend/app/hooks/useJourneyTracker.ts5
4 files changed, 8 insertions, 15 deletions
diff --git a/src/frontend/app/api/schema.ts b/src/frontend/app/api/schema.ts
index fe90642..64a9e94 100644
--- a/src/frontend/app/api/schema.ts
+++ b/src/frontend/app/api/schema.ts
@@ -173,10 +173,7 @@ export const ConsolidatedCirculationSchema = z.object({
})
.optional()
.nullable(),
- currentPosition: z
- .object(PositionSchema)
- .optional()
- .nullable(),
+ currentPosition: z.object(PositionSchema).optional().nullable(),
isPreviousTrip: z.boolean().optional().nullable(),
previousTripShapeId: z.string().optional().nullable(),
nextStreets: z.array(z.string()).optional().nullable(),
diff --git a/src/frontend/app/components/arrivals/ArrivalList.tsx b/src/frontend/app/components/arrivals/ArrivalList.tsx
index 18885c8..8fdef06 100644
--- a/src/frontend/app/components/arrivals/ArrivalList.tsx
+++ b/src/frontend/app/components/arrivals/ArrivalList.tsx
@@ -26,7 +26,10 @@ export const ArrivalList: React.FC<ArrivalListProps> = ({
<div className="flex flex-col flex-1 gap-3">
{arrivals.length === 0 && (
<div className="text-center text-muted mt-16">
- {t("estimates.none", "No hay llegadas próximas disponibles para esta parada.")}
+ {t(
+ "estimates.none",
+ "No hay llegadas próximas disponibles para esta parada."
+ )}
</div>
)}
{arrivals.map((arrival, index) =>
diff --git a/src/frontend/app/contexts/JourneyContext.tsx b/src/frontend/app/contexts/JourneyContext.tsx
index f513aa8..9c3c3ac 100644
--- a/src/frontend/app/contexts/JourneyContext.tsx
+++ b/src/frontend/app/contexts/JourneyContext.tsx
@@ -25,9 +25,7 @@ export interface ActiveJourney {
interface JourneyContextValue {
activeJourney: ActiveJourney | null;
- startJourney: (
- journey: Omit<ActiveJourney, "hasNotified">
- ) => void;
+ startJourney: (journey: Omit<ActiveJourney, "hasNotified">) => void;
stopJourney: () => void;
markNotified: () => void;
}
@@ -61,9 +59,7 @@ export function JourneyProvider({ children }: { children: ReactNode }) {
}, []);
const markNotified = useCallback(() => {
- setActiveJourney((prev) =>
- prev ? { ...prev, hasNotified: true } : null
- );
+ setActiveJourney((prev) => (prev ? { ...prev, hasNotified: true } : null));
}, []);
return (
diff --git a/src/frontend/app/hooks/useJourneyTracker.ts b/src/frontend/app/hooks/useJourneyTracker.ts
index e9be393..97bf23d 100644
--- a/src/frontend/app/hooks/useJourneyTracker.ts
+++ b/src/frontend/app/hooks/useJourneyTracker.ts
@@ -57,10 +57,7 @@ export function useJourneyTracker() {
) {
const title =
minutes <= 0
- ? t(
- "journey.notification_now_title",
- "¡Tu autobús está llegando!"
- )
+ ? t("journey.notification_now_title", "¡Tu autobús está llegando!")
: t("journey.notification_approaching_title", {
defaultValue: "Tu autobús llega en {{minutes}} min",
minutes,