diff --git a/pkg/interface/src/views/apps/publish/components/NotebookRoutes.tsx b/pkg/interface/src/views/apps/publish/components/NotebookRoutes.tsx index c4145f285..179c78128 100644 --- a/pkg/interface/src/views/apps/publish/components/NotebookRoutes.tsx +++ b/pkg/interface/src/views/apps/publish/components/NotebookRoutes.tsx @@ -1,7 +1,7 @@ import React, { useEffect } from "react"; import { RouteComponentProps, Link, Route, Switch } from "react-router-dom"; -import { Box, Text } from "@tlon/indigo-react"; -import GlobalApi from "~/api/global"; +import { Center, LoadingSpinner } from "@tlon/indigo-react"; +import GlobalApi from "~/logic/api/global"; import { Notebook as INotebook } from "~/types/publish-update"; import { Groups } from "~/types/group-update"; import { Contacts, Rolodex } from "~/types/contact-update"; @@ -12,6 +12,7 @@ import NewPost from "./new-post"; import { NoteRoutes } from './NoteRoutes'; + interface NotebookRoutesProps { api: GlobalApi; ship: string; @@ -70,6 +71,9 @@ export function NotebookRoutes( const { noteId } = routeProps.match.params; const note = notebook?.notes[noteId]; const noteUrl = relativePath(`/note/${noteId}`); + if(!note) { + return
; + } return (