chore(web): prettier (#2821)

Co-authored-by: Thomas Way <thomas@6f.io>
This commit is contained in:
Jason Rasmussen
2023-07-01 00:50:47 -04:00
committed by GitHub
parent 7c2f7d6c51
commit f55b3add80
242 changed files with 12794 additions and 13426 deletions
@@ -3,16 +3,16 @@ import { redirect } from '@sveltejs/kit';
import type { PageServerLoad } from './$types';
export const load = (async ({ locals: { user } }) => {
if (!user) {
throw redirect(302, AppRoute.AUTH_LOGIN);
} else if (!user.shouldChangePassword) {
throw redirect(302, AppRoute.PHOTOS);
}
if (!user) {
throw redirect(302, AppRoute.AUTH_LOGIN);
} else if (!user.shouldChangePassword) {
throw redirect(302, AppRoute.PHOTOS);
}
return {
user,
meta: {
title: 'Change Password'
}
};
return {
user,
meta: {
title: 'Change Password',
},
};
}) satisfies PageServerLoad;
@@ -1,28 +1,28 @@
<script lang="ts">
import { goto } from '$app/navigation';
import ChangePasswordForm from '$lib/components/forms/change-password-form.svelte';
import FullscreenContainer from '$lib/components/shared-components/fullscreen-container.svelte';
import { AppRoute } from '$lib/constants';
import type { PageData } from './$types';
import { goto } from '$app/navigation';
import ChangePasswordForm from '$lib/components/forms/change-password-form.svelte';
import FullscreenContainer from '$lib/components/shared-components/fullscreen-container.svelte';
import { AppRoute } from '$lib/constants';
import type { PageData } from './$types';
export let data: PageData;
export let data: PageData;
const onSuccessHandler = async () => {
await fetch(AppRoute.AUTH_LOGOUT, { method: 'POST' });
const onSuccessHandler = async () => {
await fetch(AppRoute.AUTH_LOGOUT, { method: 'POST' });
goto(AppRoute.AUTH_LOGIN);
};
goto(AppRoute.AUTH_LOGIN);
};
</script>
<FullscreenContainer title={data.meta.title}>
<p slot="message">
Hi {data.user.firstName}
{data.user.lastName} ({data.user.email}),
<br />
<br />
This is either the first time you are signing into the system or a request has been made to change
your password. Please enter the new password below.
</p>
<p slot="message">
Hi {data.user.firstName}
{data.user.lastName} ({data.user.email}),
<br />
<br />
This is either the first time you are signing into the system or a request has been made to change your password. Please
enter the new password below.
</p>
<ChangePasswordForm user={data.user} on:success={onSuccessHandler} />
<ChangePasswordForm user={data.user} on:success={onSuccessHandler} />
</FullscreenContainer>