Skip to content

Commit

Permalink
fix(deps): update dependency next to v9 (#1175)
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored and douglasduteil committed Aug 27, 2019
1 parent 1089d89 commit 63a277c
Show file tree
Hide file tree
Showing 4 changed files with 345 additions and 697 deletions.
2 changes: 1 addition & 1 deletion packages/code-du-travail-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"fuse.js": "3.4.5",
"isomorphic-unfetch": "^3.0.0",
"memoizee": "^0.4.14",
"next": "^8.0.3",
"next": "^9.0.5",
"react": "^16.9.0",
"react-autosuggest": "9.4.3",
"react-delay": "^0.1.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/code-du-travail-frontend/pages/_app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import PropTypes from "prop-types";
import App, { Container } from "next/app";
import App from "next/app";
import getConfig from "next/config";
import GitHubForkRibbon from "react-github-fork-ribbon";
import * as Sentry from "@sentry/browser";
Expand Down Expand Up @@ -63,7 +63,7 @@ export default class MyApp extends App {
return <ErrorPage statusCode={pageProps.statusCode} />;
}
return (
<Container>
<>
<GitHubForkRibbon
href="//github.com/SocialGouv/code-du-travail-explorer"
rel="noopener noreferrer"
Expand All @@ -73,7 +73,7 @@ export default class MyApp extends App {
version bêta
</GitHubForkRibbon>
<Component {...pageProps} />
</Container>
</>
);
}
}
12 changes: 7 additions & 5 deletions packages/code-du-travail-frontend/src/common/Metas.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import Head from "next/head";
import { Router } from "../../routes";

export default function Metas({ url, title, description, image }) {
if (!url && Router && location) {
url = `${location.protocol}//${location.host}${Router.asPath}`;
}
if (!image && location) {
image = `${location.protocol}//${location.hostname}/static/images/social-preview.png`;
if (typeof window !== "undefined") {
const { asPath: path } = Router || { asPath: "" };
url = url || `${location.protocol}//${location.host}${path}`;
image =
image ||
`${location.protocol}//${location.hostname}/static/images/social-preview.png`;
}

return (
<Head>
<title>{title}</title>
Expand Down
Loading

0 comments on commit 63a277c

Please sign in to comment.