1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2025-12-14 10:35:07 +00:00

Create page for when graphql is blocked

This commit is contained in:
Cadence Ember
2020-07-29 00:53:29 +12:00
parent d22c728473
commit 2b5899f430
3 changed files with 32 additions and 18 deletions

View File

@@ -135,6 +135,10 @@ function loadPostOverlay(shortcode, stateChangeType) {
return new Promise((resolve, reject) => {
const fetcher = fetchShortcodeFragment(shortcode)
fetcher.then(root => {
if (root.redirectTo) {
window.location.assign(root.redirectTo)
return
}
shortcodeDataMap.set(shortcode, root)
if (overlay.available) {
const {title, html} = root