Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #370 from navikt/css-fix
Browse files Browse the repository at this point in the history
Duplikat css fiks
  • Loading branch information
mjansrud authored May 18, 2020
2 parents f1584bc + 5e38a15 commit 1f63b05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/komponenter/HeadElements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ const fileFavicon32x32 = require('ikoner/favicon/favicon-32x32.png');
const fileMaskIcon = require('ikoner/favicon/safari-pinned-tab.svg');

export const HeadElements = () => {
const { APP_BASE_URL, XP_BASE_URL } = useSelector(
(state: AppState) => state.environment
);
const { XP_BASE_URL } = useSelector((state: AppState) => state.environment);
return (
<MetaTags>
<link
Expand Down Expand Up @@ -43,7 +41,6 @@ export const HeadElements = () => {
color="#5bbad5"
href={`${XP_BASE_URL}${fileMaskIcon}`}
/>
<link href={`${APP_BASE_URL}/css/client.css`} rel="stylesheet" />
</MetaTags>
);
};
Expand Down
2 changes: 2 additions & 0 deletions src/server/template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ if (process.env.NODE_ENV !== 'production') {

// Resources
const fileEnv = `${process.env.APP_BASE_URL}/env`;
const fileCss = `${process.env.APP_BASE_URL}/css/client.css`;
const fileScript = `${process.env.APP_BASE_URL}/client.js`;

const cache = new NodeCache({ stdTTL: 100, checkperiod: 120 });
Expand Down Expand Up @@ -106,6 +107,7 @@ export const template = (req: Request) => {
<!-- Styling fetched by apps -->
<div id="styles">
${HtmlMetaTags}
<link href="${fileCss}" rel="stylesheet" />
</div>
</head>
<body>
Expand Down

0 comments on commit 1f63b05

Please sign in to comment.