mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: support embed memo with iframe (#912)
This commit is contained in:
@ -8,6 +8,7 @@ const Auth = lazy(() => import("../pages/Auth"));
|
||||
const Explore = lazy(() => import("../pages/Explore"));
|
||||
const Home = lazy(() => import("../pages/Home"));
|
||||
const MemoDetail = lazy(() => import("../pages/MemoDetail"));
|
||||
const EmbedMemo = lazy(() => import("../pages/EmbedMemo"));
|
||||
|
||||
const router = createBrowserRouter([
|
||||
{
|
||||
@ -96,6 +97,19 @@ const router = createBrowserRouter([
|
||||
return null;
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/m/:memoId/embed",
|
||||
element: <EmbedMemo />,
|
||||
loader: async () => {
|
||||
try {
|
||||
await initialGlobalState();
|
||||
await initialUserState();
|
||||
} catch (error) {
|
||||
// do nth
|
||||
}
|
||||
return null;
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
export default router;
|
||||
|
Reference in New Issue
Block a user