mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +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) {
|
export function Note(props: NoteProps & RouteComponentProps) {
|
||||||
const [deleting, setDeleting] = useState(false);
|
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(() => {
|
useEffect(() => {
|
||||||
api.publish.readNote(ship.slice(1), book, noteId);
|
api.publish.readNote(ship.slice(1), book, noteId);
|
||||||
api.publish.fetchNote(ship, book, noteId);
|
api.publish.fetchNote(ship, book, noteId);
|
||||||
}, [ship, book, noteId]);
|
}, [ship, book, noteId]);
|
||||||
|
|
||||||
const rootUrl = props.baseUrl || '/~404';
|
|
||||||
|
|
||||||
const deletePost = async () => {
|
const deletePost = async () => {
|
||||||
setDeleting(true);
|
setDeleting(true);
|
||||||
await api.publish.delNote(ship.slice(1), book, noteId);
|
await api.publish.delNote(ship.slice(1), book, noteId);
|
||||||
|
Loading…
Reference in New Issue
Block a user