fix optional

This commit is contained in:
Josh Hawkins 2024-04-22 08:37:42 -05:00
parent 08b3574bb9
commit 7d70e9de40

View File

@ -43,7 +43,7 @@ export function StatusBarMessagesProvider({
const messages = useMemo(() => messagesState, [messagesState]); const messages = useMemo(() => messagesState, [messagesState]);
const addMessage = useCallback( const addMessage = useCallback(
(key: string, message: string, color: string, messageId?: string) => { (key: string, message: string, color?: string, messageId?: string) => {
const id = messageId || Date.now().toString(); const id = messageId || Date.now().toString();
const msgColor = color || "text-danger"; const msgColor = color || "text-danger";
setMessagesState((prevMessages) => ({ setMessagesState((prevMessages) => ({