Skip to content

Commit e559c85

Browse files
style: fix whitespace and change $state variable declaration to let
1 parent 54a84e5 commit e559c85

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/routes/+page.svelte

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
2-
import { goto } from '$app/navigation'
32
import { browser } from '$app/environment'
3+
import { goto } from '$app/navigation'
44
import AdditionalContext from '$lib/components/AdditionalContext.svelte'
55
import AiProviderSelector from '$lib/components/AiProviderSelector.svelte'
66
import ControlBar from '$lib/components/ControlBar.svelte'
@@ -13,7 +13,8 @@ const LOCAL_STORAGE_CONTEXT_KEY = 'wellsaid_additional_context'
1313
1414
const { data } = $props<{ data: PageData }>()
1515
16-
const formState = $state({
16+
// biome-ignore lint/style/useConst: Svelte 5 $state() pattern
17+
let formState = $state({
1718
ai: {
1819
provider: DEFAULT_PROVIDER,
1920
},
@@ -52,7 +53,7 @@ $effect(() => {
5253
// Watch for changes to lookBackHours and navigate to the new URL
5354
$effect(() => {
5455
if (!browser) return
55-
56+
5657
const lookBack = formState.form.lookBackHours
5758
if (lookBack) {
5859
const url = new URL(window.location.href)
@@ -71,7 +72,7 @@ $effect(() => {
7172
7273
$effect(() => {
7374
if (!browser) return
74-
75+
7576
const storedContext = localStorage.getItem(LOCAL_STORAGE_CONTEXT_KEY)
7677
if (storedContext) {
7778
formState.form.additionalContext = storedContext
@@ -83,7 +84,7 @@ $effect(() => {
8384
8485
$effect(() => {
8586
if (!browser) return
86-
87+
8788
if (formState.form.additionalContext) {
8889
localStorage.setItem(LOCAL_STORAGE_CONTEXT_KEY, formState.form.additionalContext)
8990
} else {

0 commit comments

Comments
 (0)