Skip to content

Commit

Permalink
correcting typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Thibault Camlane committed Jul 15, 2025
1 parent 9d9d0d2 commit e8d28f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function SatellitePassOverLocation() {
const [latitude, setLatitude] = useState<string>("");
const [longitude, setLongitude] = useState<string>("");
const [error, setError] = useState<string>("");
const locations = useLocationStore((state) => state.locations);
const locations = useLocationStore((state) => state.location);
const addLocation = useLocationStore((state) => state.addLocation);
const setSelectedLocation = useLocationStore(
(state) => state.setSelectedLocation,
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/lib/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ export const useSatelliteStore = create<SatelliteStore>()((set) => ({

// Define the state for location management, for the pass over feature
export interface LocationState {
locations: Location[];
location: Location[];
selectedLocation: Location | null;
}

// Define the actions for location management
/* eslint-disable no-unused-vars */
// Disable unused variables as the store actions defined here are used in other files,
export interface LocationActions {
setLocations: (locations: Location[]) => void;
setLocations: (location: Location[]) => void;
addLocation: (location: Location) => void;
setSelectedLocation: (location: Location) => void;
}
Expand All @@ -105,7 +105,7 @@ export interface LocationActions {
export type LocationStore = LocationState & LocationActions;
// Create location store
export const useLocationStore = create<LocationStore>()((set) => ({
locations: [
location: [
{
latitude: 63.446827,
longitude: 10.421906,
Expand All @@ -119,8 +119,8 @@ export const useLocationStore = create<LocationStore>()((set) => ({
name: "Trondheim",
},

setLocations: (locations) => set({ locations }),
setLocations: (location) => set({ location }),
addLocation: (location) =>
set((state) => ({ locations: [...state.locations, location] })),
set((state) => ({ location: [...state.location, location] })),
setSelectedLocation: (location) => set({ selectedLocation: location }),
}));

0 comments on commit e8d28f4

Please sign in to comment.