Skip to content

Commit 3d860e1

Browse files
committed
minor(modeling-commons): add connection banner to all layouts
1 parent bdf568b commit 3d860e1

2 files changed

Lines changed: 8 additions & 12 deletions

File tree

apps/modeling-commons-frontend/app/layouts/auth.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
<div
33
class="min-h-screen flex items-center justify-center px-4 py-8 bg-linear-to-b from-[#F7F9FC] to-[#F8F5FE]"
44
>
5+
<div class="absolute inset-0">
6+
<ConnectionBanner />
7+
</div>
8+
59
<UButton
610
icon="i-lucide-chevron-left"
711
to="/"
@@ -17,6 +21,7 @@
1721
>
1822
</UButton>
1923

24+
2025
<UPageCard
2126
variant="subtle"
2227
class="max-w-2xl w-full"

apps/modeling-commons-frontend/app/pages/(auth)/signup.vue

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
import type { FormSubmitEvent } from "@nuxt/ui";
33
import type * as z from "zod";
4-
import { signUpFields, signUpValidator } from "~/forms/auth";
4+
import { signUpFields, signUpValidator, type UserKind } from "~/forms/auth";
55
import { authRoutes, getSafeNextPath } from "~/utils/auth";
66
77
definePageMeta({
@@ -14,7 +14,6 @@ useSeoMeta({
1414
description: "Create an account to get started",
1515
});
1616
17-
const toast = useToast();
1817
const router = useRouter();
1918
const route = useRoute();
2019
const { signUpWithEmail } = useAuthActions();
@@ -40,19 +39,11 @@ async function onSubmit(payload: FormSubmitEvent<Schema>) {
4039
name,
4140
email,
4241
password,
43-
userKind,
42+
userKind: userKind as UserKind,
4443
next: route.query.next,
4544
});
4645
47-
if (error) {
48-
toast.add({
49-
title: "Signup failed",
50-
description: error.message ?? "We couldn't create your account.",
51-
icon: "i-lucide-x-circle",
52-
color: "error",
53-
});
54-
return;
55-
}
46+
if (error) return;
5647
5748
await router.push({
5849
path: authRoutes.verifyEmail,

0 commit comments

Comments
 (0)