From 783d8cf7ef1bdb49af43831ada00fb2782d38927 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 7 Feb 2024 16:35:12 -0800 Subject: [PATCH] refac --- .../chat/Messages/UserMessage.svelte | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/lib/components/chat/Messages/UserMessage.svelte b/src/lib/components/chat/Messages/UserMessage.svelte index d9705c46..945568d5 100644 --- a/src/lib/components/chat/Messages/UserMessage.svelte +++ b/src/lib/components/chat/Messages/UserMessage.svelte @@ -4,7 +4,7 @@ import { tick } from 'svelte'; import Name from './Name.svelte'; import ProfileImage from './ProfileImage.svelte'; - import { modelfiles, settings, user as userStore } from '$lib/stores'; + import { modelfiles, settings } from '$lib/stores'; export let user; export let message; @@ -58,19 +58,13 @@ {#if $modelfiles.map((modelfile) => modelfile.tagName).includes(message.user)} {$modelfiles.find((modelfile) => modelfile.tagName === message.user)?.title} {:else} - {#if $settings.showUsername} - {$userStore.name} - {:else} - You {message?.user ?? ''} - {/if} - {/if} - {:else} - {#if $settings.showUsername} - {$userStore.name} - {:else} - You - {/if} + You {message?.user ?? ''} {/if} + {:else if $settings.showUsername} + {user.name} + {:else} + You + {/if} {#if message.timestamp}