Commit 798acf9a authored by Aral Balkan's avatar Aral Balkan
Browse files

Navigation correctly updates when going from Sign In to Private

parent a6df46c6
......@@ -5,6 +5,8 @@
let { signedIn, currentSection } = getContext(state)
$: ;
let selectedSection = $currentSection
function handleNavigation (event) {
......@@ -31,7 +33,8 @@
<nav>
<ul>
{#each sections as section}
{#if !section.notInNavigation && shouldDisplay(section.path)}
<!-- Including $currentSection here to trigger reactivity. -->
{#if !section.notInNavigation && $currentSection && shouldDisplay(section.path)}
<li>
<!-- Display the current section without a hyperlink; all other sections with a link. -->
{#if section.path !== $currentSection}
......
......@@ -19,8 +19,9 @@
function signInSucceeded(){
$privatePath = _privatePath
$currentSection = '/private'
$signedIn = true
$currentSection = '/private'
location.hash = '/private'
// Returning an empty string as we’re called
// from within the template’s await.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment