mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
fix(core): unexpected routing history appears on the shared page (#8356)
close AF-1429 https://github.com/user-attachments/assets/a99cf79d-3615-4e0f-835c-2e66b1a34863
This commit is contained in:
@@ -165,18 +165,24 @@ export function AffineSharedPageReference({
|
||||
|
||||
const isJournal = journalHelper.isPageJournal(pageId);
|
||||
|
||||
const onClick = useCallback(() => {
|
||||
if (isJournal) {
|
||||
track.doc.editor.pageRef.navigate({
|
||||
to: 'journal',
|
||||
});
|
||||
}
|
||||
const onClick = useCallback(
|
||||
(e: React.MouseEvent) => {
|
||||
if (isJournal) {
|
||||
track.doc.editor.pageRef.navigate({
|
||||
to: 'journal',
|
||||
});
|
||||
}
|
||||
|
||||
// update refresh key
|
||||
setRefreshKey(nanoid());
|
||||
// update refresh key
|
||||
setRefreshKey(nanoid());
|
||||
|
||||
return;
|
||||
}, [isJournal]);
|
||||
// Prevent blocksuite link clicked behavior
|
||||
e.stopPropagation();
|
||||
|
||||
return;
|
||||
},
|
||||
[isJournal]
|
||||
);
|
||||
|
||||
const query = useMemo(() => {
|
||||
// A block/element reference link
|
||||
|
||||
Reference in New Issue
Block a user