feat: refine navigation and account access flow
This commit is contained in:
+3
-1
@@ -1,7 +1,9 @@
|
||||
import { apiRequest } from './api.js';
|
||||
import { mountAppBar } from './app-bar.js';
|
||||
import { bindLogout, loadSession } from './auth.js';
|
||||
import { bindScrollToTop } from './scroll-to-top.js';
|
||||
|
||||
const appBar = mountAppBar();
|
||||
const detail = document.querySelector('#recipe-detail');
|
||||
const toast = document.querySelector('#toast');
|
||||
const scrollToTop = document.querySelector('#scroll-to-top');
|
||||
@@ -221,7 +223,7 @@ function renderRecipe(recipe) {
|
||||
}
|
||||
|
||||
bindLogout();
|
||||
await loadSession();
|
||||
appBar.setUser(await loadSession());
|
||||
|
||||
try {
|
||||
const recipeId = decodeURIComponent(window.location.pathname.split('/').filter(Boolean).pop());
|
||||
|
||||
Reference in New Issue
Block a user