Skip to content
Snippets Groups Projects
Commit 9640eb76 authored by timothycarambat's avatar timothycarambat
Browse files

Fallback logo on offline mode

parent 122f2906
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,9 @@ export default function useLogo() { ...@@ -12,7 +12,9 @@ export default function useLogo() {
async function fetchInstanceLogo() { async function fetchInstanceLogo() {
try { try {
const logoURL = await System.fetchLogo(!prefersDarkMode); const logoURL = await System.fetchLogo(!prefersDarkMode);
setLogo(logoURL); logoURL
? setLogo(logoURL)
: setLogo(prefersDarkMode ? AnythingLLMLight : AnythingLLMDark);
} catch (err) { } catch (err) {
setLogo(prefersDarkMode ? AnythingLLMLight : AnythingLLMDark); setLogo(prefersDarkMode ? AnythingLLMLight : AnythingLLMDark);
console.error("Failed to fetch logo:", err); console.error("Failed to fetch logo:", err);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment