Skip to content

Commit 3e83e1c

Browse files
committed
Feat: Re-export the router from @nav-router/solid, with router as its factory
1 parent 642c34c commit 3e83e1c

6 files changed

Lines changed: 12 additions & 9 deletions

File tree

‎examples/solid/client/app.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import 'nav-router/plugins/head';
2-
import 'nav-router/plugins/preload-intent';
3-
import 'nav-router/plugins/view-transitions';
1+
import '@nav-router/plugins/head';
2+
import '@nav-router/plugins/preload-intent';
3+
import '@nav-router/plugins/view-transitions';
44

55
import { app } from './routes.js';
66

‎examples/solid/client/routes.js‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { solidRouter } from '@nav-router/solid';
1+
import { lazy, router } from '@nav-router/solid';
22
import { wait } from '@semantic-ui/utils';
3-
import { lazy } from 'nav-router';
43

54
import { members, user } from './store.js';
65
import { Breadcrumbs } from './views/breadcrumbs.jsx';
@@ -19,7 +18,7 @@ import { TeamLayout } from './views/team-layout.jsx';
1918
import { TeamOverviewPage } from './views/team-overview-page.jsx';
2019
import { TeamSidebar } from './views/team-sidebar.jsx';
2120

22-
export const app = solidRouter({
21+
export const app = router({
2322
name: 'home',
2423
mount: '#app',
2524
title: 'Acme Console',

‎examples/solid/client/views/root-layout.jsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { href, isActive, isCurrent } from 'nav-router';
1+
import { href, isActive, isCurrent } from '@nav-router/solid';
22
import { splitProps } from 'solid-js';
33

44
import { signIn, user } from '../store.js';

‎examples/solid/client/views/sign-in-page.jsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { navigate } from 'nav-router';
1+
import { navigate } from '@nav-router/solid';
22

33
import { signIn } from '../store.js';
44

‎examples/solid/client/views/team-layout.jsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { href, isCurrent } from 'nav-router';
1+
import { href, isCurrent } from '@nav-router/solid';
22

33
import { orgs } from '../store.js';
44

‎integrations/solid/index.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,8 @@ export class SolidRouter extends ReactiveRouter {
7373
}
7474
}
7575

76+
// the router's whole public surface from the one import a Solid app writes, with router as the
77+
// factory for this integration
78+
export * from 'nav-router';
7679
export const solidRouter = (options) => new SolidRouter(options);
80+
export { solidRouter as router };

0 commit comments

Comments
 (0)