all repos — caroster @ 39f71849bbefb9cdb39fad2fccbae75ffe1b10cb

[Octree] Group carpool to your event https://caroster.io

add Helmet
Karian Før karian.for@gmail.com
Mon, 13 Jul 2020 10:02:46 +0200
commit

39f71849bbefb9cdb39fad2fccbae75ffe1b10cb

parent

8410f04c45c43c5699fd045dd2e81379b8d08396

M app/package-lock.jsonapp/package-lock.json

@@ -10912,6 +10912,22 @@ "version": "6.0.7",

"resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.7.tgz", "integrity": "sha512-TAv1KJFh3RhqxNvhzxj6LeT5NWklP6rDr2a0jaTfsZ5wSZWHOGeqQyejUp3xxLfPt2UpyJEcVQB/zyPcmonNFA==" }, + "react-fast-compare": { + "version": "3.2.0", + "resolved": "https://npm-8ee.hidora.com/react-fast-compare/-/react-fast-compare-3.2.0.tgz", + "integrity": "sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==" + }, + "react-helmet": { + "version": "6.1.0", + "resolved": "https://npm-8ee.hidora.com/react-helmet/-/react-helmet-6.1.0.tgz", + "integrity": "sha512-4uMzEY9nlDlgxr61NL3XbKRy1hEkXmKNXhjbAIOVw5vcFrsdYbH2FEwcNyWvWinl103nXgzYNlns9ca+8kFiWw==", + "requires": { + "object-assign": "^4.1.1", + "prop-types": "^15.7.2", + "react-fast-compare": "^3.1.1", + "react-side-effect": "^2.1.0" + } + }, "react-i18next": { "version": "11.7.0", "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-11.7.0.tgz",

@@ -11042,6 +11058,11 @@ "webpack-dev-server": "3.10.3",

"webpack-manifest-plugin": "2.2.0", "workbox-webpack-plugin": "4.3.1" } + }, + "react-side-effect": { + "version": "2.1.0", + "resolved": "https://npm-8ee.hidora.com/react-side-effect/-/react-side-effect-2.1.0.tgz", + "integrity": "sha512-IgmcegOSi5SNX+2Snh1vqmF0Vg/CbkycU9XZbOHJlZ6kMzTmi3yc254oB1WCkgA7OQtIAoLmcSFuHTc/tlcqXg==" }, "react-slick": { "version": "0.26.1",
M app/package.jsonapp/package.json

@@ -17,6 +17,7 @@ "marked": "^1.1.0",

"moment": "^2.27.0", "react": "^16.13.1", "react-dom": "^16.13.1", + "react-helmet": "^6.1.0", "react-i18next": "^11.7.0", "react-leaflet": "^2.7.0", "react-router-dom": "^5.2.0",
M app/public/index.htmlapp/public/index.html

@@ -10,17 +10,16 @@ />

<meta name="theme-color" content="#000000" /> <meta name="description" - content="Web site created using create-react-app" + content="Covoiturez à un événement en proposant une voiture ou en prenant une place." /> + <title>Caroster - Covoiturage de groupe</title> + <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" /> - <!-- - manifest.json provides metadata used when your web app is installed on a - user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ - --> + <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> <link rel="stylesheet"

@@ -33,29 +32,9 @@ rel="stylesheet"

type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick-theme.min.css" /> - <!-- - Notice the use of %PUBLIC_URL% in the tags above. - It will be replaced with the URL of the `public` folder during the build. - Only files inside the `public` folder can be referenced from the HTML. - - Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will - work correctly both with client-side routing and a non-root public URL. - Learn how to configure a non-root public URL by running `npm run build`. - --> - <title>Caroster</title> </head> <body> <noscript>You need to enable JavaScript to run this app.</noscript> <div id="root"></div> - <!-- - This HTML file is a template. - If you open it directly in the browser, you will see an empty page. - - You can add webfonts, meta tags, or analytics to this file. - The build step will place the bundled scripts into the <body> tag. - - To begin the development, run `npm start` or `yarn start`. - To create a production bundle, use `npm run build` or `yarn build`. - --> </body> </html>
M app/src/App.jsapp/src/App.js

@@ -1,10 +1,10 @@

import React from 'react'; import {StrapiProvider} from 'strapi-react-context'; +import CssBaseline from '@material-ui/core/CssBaseline'; import {ThemeProvider} from '@material-ui/core/styles'; import {MuiPickersUtilsProvider} from '@material-ui/pickers'; import MomentUtils from '@date-io/moment'; import {ToastProvider} from './contexts/Toast'; -import CssBaseline from '@material-ui/core/CssBaseline'; import Router from './Router'; import theme from './theme';
M app/src/locales/fr.jsonapp/src/locales/fr.json

@@ -1,4 +1,7 @@

{ + "meta": { + "title": "Caroster - {{title}}" + }, "generic": { "loading": "Chargement...", "close": "Fermer",
M app/src/pages/Event.jsapp/src/pages/Event.js

@@ -1,4 +1,5 @@

import React, {useState, useReducer, useEffect} from 'react'; +import {Helmet} from 'react-helmet'; import {useTranslation} from 'react-i18next'; import AppBar from '@material-ui/core/AppBar'; import Toolbar from '@material-ui/core/Toolbar';

@@ -64,6 +65,9 @@ if (!event) return <Loading />;

return ( <Layout> + <Helmet> + <title>{t('meta.title', {title: event.name})}</title> + </Helmet> <AppBar position="static" color="primary"