c6c8497906
import/no-cycle (now active) flagged 17 cycles across 12 files: - shared/ui self-barrel cycles (Logo/Stat/StatGroup/ComboControl/ FilterGroup/SectionHeader): import siblings relatively instead of through the $shared/ui barrel that re-exports them - shared/lib/utils: roundToStepPrecision imports getDecimalPlaces relatively instead of via the utils barrel - routes: lazy-load Redirect in the router so it no longer statically imports a component that imports navigate back from it
25 lines
638 B
TypeScript
25 lines
638 B
TypeScript
import { createRouter } from 'sv-router';
|
|
import Home from './Home.svelte';
|
|
|
|
/**
|
|
* Single-page router for glyphdiff.
|
|
*
|
|
* Currently exposes one route; structure exists so additional routes can be
|
|
* added without touching the app shell.
|
|
*/
|
|
export const {
|
|
isActive,
|
|
navigate,
|
|
p,
|
|
preload,
|
|
route,
|
|
} = createRouter({
|
|
'/': Home,
|
|
/**
|
|
* Any unmatched path redirects to home until additional routes exist.
|
|
* Lazy-loaded so `router` doesn't statically import `Redirect`, which
|
|
* imports `navigate` from here — breaks the import cycle.
|
|
*/
|
|
'*notfound': () => import('./Redirect.svelte'),
|
|
});
|