From c0746289e8ff1c4509ea544469333baf116dbeb8 Mon Sep 17 00:00:00 2001
From: ivarlovlie <git@ivarlovlie.no>
Date: Mon, 10 Oct 2022 00:38:10 +0800
Subject: refactor: Update imports and clean up

---
 .../routes/(main)/(public)/sign-up/+page.svelte    | 24 +++++-----------------
 1 file changed, 5 insertions(+), 19 deletions(-)

(limited to 'code/app/src/routes/(main)/(public)/sign-up/+page.svelte')

diff --git a/code/app/src/routes/(main)/(public)/sign-up/+page.svelte b/code/app/src/routes/(main)/(public)/sign-up/+page.svelte
index 0dfa41a..f2f1695 100644
--- a/code/app/src/routes/(main)/(public)/sign-up/+page.svelte
+++ b/code/app/src/routes/(main)/(public)/sign-up/+page.svelte
@@ -3,8 +3,8 @@
     import { create_account } from "$lib/api/user";
     import { Button, Input, Alert } from "$lib/components";
     import LL from "$lib/i18n/i18n-svelte";
-    import type { CreateAccountPayload } from "$lib/models/CreateAccountPayload";
-    import type { ErrorResult } from "$lib/models/ErrorResult";
+    import type { CreateAccountPayload } from "$lib/models/internal/CreateAccountPayload";
+    import type { ErrorResult } from "$lib/models/internal/ErrorResult";
 
     const formData = {
         username: "",
@@ -16,8 +16,7 @@
         title: "",
     } as ErrorResult;
     let loading = false;
-    $: showErrorAlert =
-        (errorData?.text.length ?? 0 + errorData?.title.length ?? 0) > 0;
+    $: showErrorAlert = (errorData?.text.length ?? 0 + errorData?.title.length ?? 0) > 0;
 
     async function submitFormAsync() {
         loading = true;
@@ -49,13 +48,7 @@
 
     <div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
         <div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
-            <Alert
-                title={errorData.title}
-                message={errorData.text}
-                type="error"
-                class="mb-2"
-                visible={showErrorAlert}
-            />
+            <Alert title={errorData.title} message={errorData.text} type="error" class="mb-2" visible={showErrorAlert} />
             <form class="space-y-6" on:submit|preventDefault={submitFormAsync}>
                 <Input
                     label={$LL.emailAddress()}
@@ -67,14 +60,7 @@
                     bind:value={formData.username}
                 />
 
-                <Input
-                    label={$LL.password()}
-                    id="password"
-                    name="password"
-                    required
-                    type="password"
-                    bind:value={formData.password}
-                />
+                <Input label={$LL.password()} id="password" name="password" required type="password" bind:value={formData.password} />
                 <Button type="submit" text={$LL.submit()} {loading} fullWidth />
             </form>
         </div>
-- 
cgit v1.3

