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.

331 B
Raw Blame
import { useId } from 'react';

/**
 * Defs ids for paint, unique per mounted copy of a page (paintRender.tsx says why).
 */

/** A defs id unique to this mounted instance, safe inside `url(#...)`. */
export function usePaintId(prefix: string): string {
  const raw = useId();
  return `${prefix}-${raw.replace(/[^\w-]/g, '')}`;
}