mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Better return from PDF to library
This commit is contained in:
parent
900d4b696b
commit
a8d1a8f6b3
1 changed files with 8 additions and 2 deletions
|
|
@ -35,8 +35,9 @@ export default function PdfArticleContainer(
|
|||
const containerRef = useRef<HTMLDivElement | null>(null)
|
||||
const [notebookKey, setNotebookKey] = useState<string>(uuidv4())
|
||||
const [noteTarget, setNoteTarget] = useState<Highlight | undefined>(undefined)
|
||||
const [noteTargetPageIndex, setNoteTargetPageIndex] =
|
||||
useState<number | undefined>(undefined)
|
||||
const [noteTargetPageIndex, setNoteTargetPageIndex] = useState<
|
||||
number | undefined
|
||||
>(undefined)
|
||||
const highlightsRef = useRef<Highlight[]>([])
|
||||
|
||||
const annotationOmnivoreId = (annotation: Annotation): string | undefined => {
|
||||
|
|
@ -448,6 +449,11 @@ export default function PdfArticleContainer(
|
|||
document.dispatchEvent(new Event('openOriginalArticle'))
|
||||
break
|
||||
case 'u':
|
||||
const navReturn = window.sessionStorage.getItem('nav-return')
|
||||
if (navReturn) {
|
||||
window.location.assign(navReturn)
|
||||
return
|
||||
}
|
||||
const query = window.sessionStorage.getItem('q')
|
||||
if (query) {
|
||||
window.location.assign(`/home?${query}`)
|
||||
|
|
|
|||
Loading…
Reference in a new issue