Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

433 B
Raw Blame
import { useTripStore } from '../../store/tripStore';

/**
 * TripFormModal's onCoverUpdate for the open trip: the new cover goes straight into
 * the store's trip, so the planner shows it without reloading the trip.
 */
export function applyTripCoverUpdate(_tripId: number, coverUrl: string | null): void {
  useTripStore.setState((state) => ({
    trip: state.trip ? { ...state.trip, cover_image: coverUrl } : state.trip,
  }));
}