mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 06:35:32 +03:00
Merge pull request #3683 from urbit/mp/publish/fix-index-link
publish: fix 'notebook index' link
This commit is contained in:
commit
8f77bde01c
@ -31,14 +31,12 @@ interface NoteProps {
|
||||
|
||||
export function Note(props: NoteProps & RouteComponentProps) {
|
||||
const [deleting, setDeleting] = useState(false);
|
||||
const { notebook, note, contacts, ship, book, noteId, api, baseUrl } = props;
|
||||
const { notebook, note, contacts, ship, book, noteId, api, rootUrl } = props;
|
||||
useEffect(() => {
|
||||
api.publish.readNote(ship.slice(1), book, noteId);
|
||||
api.publish.fetchNote(ship, book, noteId);
|
||||
}, [ship, book, noteId]);
|
||||
|
||||
const rootUrl = props.baseUrl || '/~404';
|
||||
|
||||
const deletePost = async () => {
|
||||
setDeleting(true);
|
||||
await api.publish.delNote(ship.slice(1), book, noteId);
|
||||
|
Loading…
Reference in New Issue
Block a user