fix reference details page

This commit is contained in:
grove5_admin committed 2026-05-01 19:19:44 -07:00
1 parent 96bc98df97
commit c41db50fad
2 files changed
+9 -18

No files matched your search

+9 -2
View File
@@ -35,8 +35,11 @@
const showOnboarding = $derived(!cultivar.state.ui.onboarding_complete || $routeStore.page === 'onboarding');
const showDetail = $derived($routeStore.page === 'bag');
const showReference = $derived($routeStore.page === 'reference');
const showReference = $derived($routeStore.page === 'reference' || $routeStore.page === 'referenceDetail');
const selectedBagId = $derived(showDetail ? ($routeStore as Extract<Route, { page: 'bag' }>).bagId : null);
const referenceDetail = $derived($routeStore.page === 'referenceDetail'
? { type: ($routeStore as Extract<Route, { page: 'referenceDetail' }>).type, id: ($routeStore as Extract<Route, { page: 'referenceDetail' }>).id }
: null);
</script>
<div id="app-root">
@@ -52,7 +55,11 @@
{/if}
{#if showReference}
<Reference onBack={handleCloseReference} />
<Reference
onBack={handleCloseReference}
initialDetailType={referenceDetail?.type ?? null}
initialDetailId={referenceDetail?.id ?? null}
/>
{/if}
{#if showOnboarding}
-16
View File
@@ -48,19 +48,6 @@
'Another day',
];
// Mushroom-themed greetings
const mushroomGreetings = [
'What a fungi',
'Morel to the story',
'Spore-tacular day',
'Fun-guy',
'Shroom-tacular',
'In spore-tacular shape',
'Cap-tivating',
'Truffle shuffle',
'Portobello vibes',
];
let greetings: string[];
if (hour < 5) {
greetings = nightGreetings;
@@ -79,9 +66,6 @@
greetings = [...greetings, ...weekdayGreetings];
}
// Mix in mushroom-themed greetings
greetings = [...greetings, ...mushroomGreetings];
// Pick a random greeting
const greetingIndex = Math.floor(Math.random() * greetings.length);
const greeting = greetings[greetingIndex];