Skip to content

Commit 6166dbf

Browse files
committed
fix: bugs with formatting in signup page
1 parent 5f9617b commit 6166dbf

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/routes/create/post/+page.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
import { profile } from '$lib/auth.svelte.js'
2+
import { redirect } from '@sveltejs/kit'
3+
14
export const load = ({ url }) => {
5+
if (!profile.current.jwt) redirect(302, '/login')
6+
27
return { crosspost: Boolean(url.searchParams.get('crosspost')) }
38
}

src/routes/signup/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
</svelte:head>
6868

6969
<div class="mx-auto max-w-xl flex flex-col gap-4 my-auto h-max w-full">
70-
<Button href="/accounts" class="inline-block mb-4 w-max" rounding="pill">
70+
<Button href="/accounts" class="mb-4 w-max" rounding="pill">
7171
<Icon src={ArrowLeft} size="16" micro />
7272
{$t('common.back')}
7373
</Button>

src/routes/signup/[instance]/+page.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@
157157
class="flex flex-col gap-4 h-full w-full flex-2/3"
158158
onsubmit={preventDefault(submit)}
159159
>
160-
<ErrorContainer scope={page.url.pathname} />
161-
<Button href="/accounts" class="inline-block mb-4 w-max" rounding="pill">
160+
<Button href="/accounts" class=" mb-4 w-max" rounding="pill">
162161
<Icon src={ArrowLeft} size="16" micro />
163162
{$t('common.back')}
164163
</Button>
@@ -177,6 +176,7 @@
177176
</span>
178177
{/snippet}
179178
</Header>
179+
<ErrorContainer scope={page.url.pathname} />
180180

181181
{#if data.site_view.local_site.registration_mode != 'Closed'}
182182
<div class="flex flex-col md:flex-row gap-2 *:flex-1">

0 commit comments

Comments
 (0)