Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
natehouk committed Jul 10, 2024
1 parent f2c6ad2 commit c9a6d34
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
10 changes: 7 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"prettier.requireConfig": false,
"prettier.useEditorConfig": true,
"stylelint.autoFixOnSave": true,
"search.exclude": {
"": true
}
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
Expand All @@ -24,7 +27,8 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"search.exclude": {
"": true
}
"[markdown]": {
"editor.quickSuggestions": true,
"editor.wordBasedSuggestions": false
},
}
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
},
"devDependencies": {
"@fontsource/fira-mono": "^4.5.10",
"@neoconfetti/svelte": "^2.2.1",
"@playwright/test": "^1.45.1",
"@sveltejs/adapter-auto": "^3.2.2",
"@sveltejs/adapter-vercel": "^5.4.0",
Expand Down Expand Up @@ -71,6 +70,7 @@
"stream-chat": "^8.37.0",
"svelte-french-toast": "^1.2.0",
"svelte-icons": "^2.1.0",
"svelte-legos": "^0.2.3",
"svelte-sonner": "^0.3.24",
"svelte-tel-input": "^3.4.1",
"sveltekit-superforms": "^2.15.2",
Expand Down
13 changes: 3 additions & 10 deletions src/routes/profile/ProfileForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,17 @@
import toast from 'svelte-french-toast';
import success from '$lib/audio/success.mp3';
import { tick } from 'svelte';
import { confetti } from '@neoconfetti/svelte';
import { confettiAction } from 'svelte-legos';
export let data: SuperValidated<Infer<ArtistSchema>>;
let isVisible = false;
const form = superForm(data, {
validators: zodClient(artistSchema),
resetForm: false,
async onUpdated({ form }) {
onUpdated({ form }) {
if (form.message == 'success') {
const audio = new Audio();
audio.src = success;
audio.load();
isVisible = false;
await tick();
isVisible = true;
audio.play();
toast.success('Successfully saved!');
}
Expand Down Expand Up @@ -252,13 +248,10 @@
</div>
</div>
<div>
<Form.Button>Submit</Form.Button>
<Form.Button use:confetti>Submit</Form.Button>
</div>
<!-- <div class="m-4">
<SuperDebug data={$formData} />
</div> -->
</form>
{#if isVisible}
<div use:confetti />
{/if}
</SignedIn>

0 comments on commit c9a6d34

Please sign in to comment.