Skip to content

Commit

Permalink
Fix logo
Browse files Browse the repository at this point in the history
  • Loading branch information
felixmosh committed Jun 2, 2021
1 parent 6251c28 commit 5c5add9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
9 changes: 3 additions & 6 deletions packages/ui/src/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<base href="<%= basePath %>" />
<title>Bull Dashboard</title>
<link rel="alternate icon" type="image/png" href="/static/favicon-32x32.png">
<link rel="icon" type="image/svg+xml" href="/static/images/logo.svg">
<link rel="alternate icon" type="image/png" href="<%= basePath %>/static/favicon-32x32.png">
<link rel="icon" type="image/svg+xml" id="fav-logo" href="<%= basePath %>/static/images/logo.svg">
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500&display=swap" rel="stylesheet">
</head>
<body>
Expand Down
3 changes: 2 additions & 1 deletion packages/ui/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import { BrowserRouter } from 'react-router-dom';
import { App } from './components/App';
import { Api } from './services/Api';

const basePath = document.head.querySelector('base')?.getAttribute('href') || '';
const basePath = ((window as any).__basePath__ =
document.head.querySelector('base')?.getAttribute('href') || '');
const api = new Api({ basePath });

render(
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/utils/getStaticPath.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export function getStaticPath(path: string): string {
return `/static${path}`;
return `${(window as any).__basePath__}/static${path}`;
}

0 comments on commit 5c5add9

Please sign in to comment.