refac: move generateInitialsImage function to utils

This commit is contained in:
Danny Liu 2024-04-04 12:09:07 -07:00
parent 4195af4942
commit 0c43897f3d
3 changed files with 25 additions and 24 deletions

View file

@ -5,6 +5,7 @@
import { WEBUI_NAME, config, user } from '$lib/stores';
import { onMount, getContext } from 'svelte';
import { toast } from 'svelte-sonner';
import { generateInitialsImage } from '$lib/utils';
const i18n = getContext('i18n');
@ -35,7 +36,7 @@
};
const signUpHandler = async () => {
const sessionUser = await userSignUp(name, email, password).catch((error) => {
const sessionUser = await userSignUp(name, email, password, generateInitialsImage(name)).catch((error) => {
toast.error(error);
return null;
});