refac: move generateInitialsImage function to utils

This commit is contained in:
Danny Liu committed 2024-04-04 12:09:07 -07:00
1 parent 4195af4942
commit 0c43897f3d
3 files changed
+25 -24

No files matched your search

+2 -1
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;
});