Skip to content

Commit 5b731d1

Browse files
Fix public url
1 parent 52700da commit 5b731d1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: packages/client/src/App.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ import CollectionDetail from './pages/CollectionDetail';
2525
import Sandbox from './pages/Sandbox';
2626
import { config } from './plugin-system/config';
2727

28+
const publicUrl = process.env.PUBLIC_URL || '';
29+
2830
let basename: string | undefined;
29-
if (process.env.PUBLIC_URL) {
31+
if (publicUrl) {
3032
try {
31-
basename = new URL(process.env.PUBLIC_URL).pathname;
33+
basename = new URL(publicUrl).pathname;
3234
// eslint-disable-next-line @typescript-eslint/no-unused-vars
3335
} catch (error) {
3436
// no-op
@@ -56,7 +58,7 @@ export const App = () => (
5658
>
5759
<Flex gap={4} alignItems='center'>
5860
<Image
59-
src={`${process.env.PUBLIC_URL}/meta/icon-512.png`}
61+
src={`${publicUrl}/meta/icon-512.png`}
6062
width={8}
6163
aspectRatio={1}
6264
borderRadius='md'

0 commit comments

Comments
 (0)