aboutsummaryrefslogtreecommitdiff
path: root/apps/website/src/components/logos/Logo.astro
diff options
context:
space:
mode:
authorLynithDev <61880709+LynithDev@users.noreply.github.com>2024-01-20 11:27:36 +0100
committerLynithDev <61880709+LynithDev@users.noreply.github.com>2024-01-20 11:27:36 +0100
commit0225e2e17d12a32467bc12f33b2402287c79e23f (patch)
tree9d542217953eb915b3a4da9799fd24b723281054 /apps/website/src/components/logos/Logo.astro
parent8be3434d32d7ed9046000377f7f9e59ef2a971b3 (diff)
downloadNexus-0225e2e17d12a32467bc12f33b2402287c79e23f.tar.gz
Nexus-0225e2e17d12a32467bc12f33b2402287c79e23f.tar.bz2
Nexus-0225e2e17d12a32467bc12f33b2402287c79e23f.zip
Fixed icon system
Diffstat (limited to 'apps/website/src/components/logos/Logo.astro')
-rw-r--r--apps/website/src/components/logos/Logo.astro7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/website/src/components/logos/Logo.astro b/apps/website/src/components/logos/Logo.astro
index 7988092..6b085fa 100644
--- a/apps/website/src/components/logos/Logo.astro
+++ b/apps/website/src/components/logos/Logo.astro
@@ -1,4 +1,6 @@
---
+import { readFile } from 'node:fs/promises';
+import { join } from 'node:path';
import type { LogoType } from '@webtypes/Config';
import type { HTMLAttributes } from 'astro/types';
@@ -18,8 +20,9 @@ let svg: string | undefined;
try {
if (logo === undefined)
return;
- const dir = '../../../public/media';
- svg = (await import(/* @vite-ignore */ `${dir}/${logo.replaceAll('.', '/')}.svg?raw`)).default;
+
+ const dir = new URL(join('..', '..', '..', 'public', 'media'), import.meta.url).pathname;
+ svg = (await readFile(`${dir}/${logo.replaceAll('.', '/')}.svg`, { encoding: 'utf8' }));
if (svg === undefined)
return;