mirror of
https://github.com/jcreek/SvelteKitSaasBoilerplate.git
synced 2026-07-12 18:43:50 +00:00
refactor(#35): iNdEnTaTiOn
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
<script lang="ts">
|
||||
import type { NavLinkItem } from "$lib/types/Nav/NavLinkItem";
|
||||
import type { SupabaseClient } from "@supabase/supabase-js";
|
||||
import SignOut from "../SignOut.svelte";
|
||||
import type { NavLinkItem } from '$lib/types/Nav/NavLinkItem';
|
||||
import type { SupabaseClient } from '@supabase/supabase-js';
|
||||
import SignOut from '../SignOut.svelte';
|
||||
|
||||
export let linkItem: NavLinkItem;
|
||||
export let supabase: SupabaseClient | null = null;
|
||||
|
||||
</script>
|
||||
|
||||
{#if !linkItem.isSignout}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
export let isMobile: boolean;
|
||||
export let supabase: SupabaseClient | null;
|
||||
|
||||
|
||||
let isOpen = false;
|
||||
</script>
|
||||
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
|
||||
if (isMobile) {
|
||||
if (session) {
|
||||
userAccountLinks.push(
|
||||
{
|
||||
userAccountLinks.push({
|
||||
text: 'User', // TODO - replace with user's name - will require a database call to get the user's name - suggest setting up a user model to store user data.
|
||||
isParent: true,
|
||||
isUserAccount: true,
|
||||
@@ -27,15 +26,12 @@
|
||||
isSignout: true
|
||||
}
|
||||
]
|
||||
}
|
||||
);
|
||||
});
|
||||
} else {
|
||||
userAccountLinks.push(
|
||||
{
|
||||
userAccountLinks.push({
|
||||
text: 'Log in',
|
||||
href: '/login'
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { SupabaseClient } from "@supabase/supabase-js";
|
||||
import type { SupabaseClient } from '@supabase/supabase-js';
|
||||
|
||||
export async function signOut(supabase: SupabaseClient, callback: () => void) {
|
||||
// TODO use the error from the response
|
||||
|
||||
Reference in New Issue
Block a user