mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
feat(core): preview template & snapshot import (#8193)
This commit is contained in:
@@ -94,6 +94,19 @@ export const topLevelRoutes = [
|
||||
path: '/template/import',
|
||||
lazy: () => import('./pages/import-template'),
|
||||
},
|
||||
{
|
||||
path: '/template/preview',
|
||||
loader: ({ request }) => {
|
||||
const url = new URL(request.url);
|
||||
const workspaceId = url.searchParams.get('workspaceId');
|
||||
const docId = url.searchParams.get('docId');
|
||||
const templateName = url.searchParams.get('name');
|
||||
|
||||
return redirect(
|
||||
`/workspace/${workspaceId}/${docId}?isTemplate=true&templateName=${encodeURIComponent(templateName ?? '')}`
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/auth/:authType',
|
||||
lazy: () => import(/* webpackChunkName: "auth" */ './pages/auth/auth'),
|
||||
|
||||
Reference in New Issue
Block a user