Commit
โข
865ebc3
1
Parent(s):
5b779a6
๐ Fix settings modal not resetting its state (#240)
Browse files* ๐ Fix settings modal not resetting its state
should not mutate passed prop
* make variable dynamic in case it's updated from outside
Co-authored-by: Eliott C. <coyotte508@gmail.com>
* Revert "make variable dynamic in case it's updated from outside"
This reverts commit ba1938eaf92c91a42077e69a860f89ec1a8bd740.
---------
Co-authored-by: Eliott C. <coyotte508@gmail.com>
src/lib/components/SettingsModal.svelte
CHANGED
@@ -10,6 +10,8 @@
|
|
10 |
|
11 |
export let settings: Pick<Settings, "shareConversationsWithModelAuthors">;
|
12 |
|
|
|
|
|
13 |
const dispatch = createEventDispatcher<{ close: void }>();
|
14 |
</script>
|
15 |
|
@@ -35,7 +37,7 @@
|
|
35 |
{/each}
|
36 |
<Switch
|
37 |
name="shareConversationsWithModelAuthors"
|
38 |
-
bind:checked={
|
39 |
/>
|
40 |
Share conversations with model authors
|
41 |
</label>
|
|
|
10 |
|
11 |
export let settings: Pick<Settings, "shareConversationsWithModelAuthors">;
|
12 |
|
13 |
+
let shareConversationsWithModelAuthors = settings.shareConversationsWithModelAuthors;
|
14 |
+
|
15 |
const dispatch = createEventDispatcher<{ close: void }>();
|
16 |
</script>
|
17 |
|
|
|
37 |
{/each}
|
38 |
<Switch
|
39 |
name="shareConversationsWithModelAuthors"
|
40 |
+
bind:checked={shareConversationsWithModelAuthors}
|
41 |
/>
|
42 |
Share conversations with model authors
|
43 |
</label>
|