Optimisation referencement
This commit is contained in:
@@ -27,7 +27,7 @@ const OgHead = props => {
|
||||
<meta name="twitter:title" content={props.seo_title}/>
|
||||
<meta name="twitter:description" content={props.seo_description}/>
|
||||
<meta name="twitter:image" content={props.image}/>
|
||||
{/* <meta name="robots" content="noindex, nofollow"></meta> */}
|
||||
<meta name="robots" content="noindex, nofollow"></meta>
|
||||
{/* <meta httpEquiv='cache-control' content='no-store,no-cache'></meta>
|
||||
<meta httpEquiv='expires' content='0'></meta>
|
||||
<meta httpEquiv='pragma' content='no-cache'></meta> */}
|
||||
|
||||
@@ -1,31 +1,21 @@
|
||||
import React, { Fragment } from 'react'
|
||||
import OgHead from '../atoms/OgHead'
|
||||
import Router from 'next/router'
|
||||
import { withStyles } from '@material-ui/core/styles';
|
||||
import getConfig from 'next/config'
|
||||
import Typography from '@material-ui/core/Typography';
|
||||
import Button from '@material-ui/core/Button';
|
||||
import Avatar from '@material-ui/core/Avatar';
|
||||
import Card from '@material-ui/core/Card';
|
||||
import Chip from '@material-ui/core/Chip';
|
||||
import CardContent from '@material-ui/core/CardContent';
|
||||
import CardMedia from '@material-ui/core/CardMedia';
|
||||
import CardHeader from '@material-ui/core/CardHeader';
|
||||
import KeyboardArrowleftIcon from '@material-ui/icons/PlayArrowRounded';
|
||||
import IconText from '../atoms/IconText';
|
||||
import IconTextInline from './../atoms/IconTextInline';
|
||||
import SocialShare from './SocialShare';
|
||||
import SimpleCollapse from '../atoms/SimpleCollapse';
|
||||
import _ from "lodash/string";
|
||||
import Ar from "lodash/array";
|
||||
import Hidden from '@material-ui/core/Hidden';
|
||||
import Link from 'next/link'
|
||||
import withWidth, { isWidthUp } from '@material-ui/core/withWidth'
|
||||
|
||||
import { isWidthUp } from '@material-ui/core/withWidth'
|
||||
import JobPosting from '../atoms/JobPosting'
|
||||
import Moment from 'react-moment';
|
||||
import StickyBox from "react-sticky-box";
|
||||
const renderLoader = () => <p>Chargement</p>;
|
||||
const styles = theme => ({
|
||||
primary: {
|
||||
color: theme.palette.primary.main,
|
||||
@@ -679,17 +669,17 @@ function OffreDetail(props) {
|
||||
const logoUrl = (offre.company ? publicRuntimeConfig.symphonyUrl + publicRuntimeConfig.cachedMediaUrl + offre.company.logo : "https://blog.talentstube.com/wp-content/uploads/2021/01/default_picture_company.jpg")
|
||||
const DefaultUrl = "https://blog.talentstube.com/wp-content/uploads/2021/01/default_picture_company.jpg"
|
||||
const imgUrl = (offre.company && offre.company.presentation_video && offre.company.presentation_video.thumbnails && offre.company.presentation_video.thumbnails[0] && offre.company.presentation_video.thumbnails[0].sizes[3]) ? offre.company.presentation_video.thumbnails[0].sizes[3].link : DefaultUrl
|
||||
const imgUrlDesktop = (offre.company && offre.company.presentation_video && offre.company.presentation_video.thumbnails && offre.company.presentation_video.thumbnails[0] && offre.company.presentation_video.thumbnails[0].sizes[4]) ? offre.company.presentation_video.thumbnails[0].sizes[4].link : DefaultUrl
|
||||
const imgUrlDesktop = (offre.company && offre.company.presentation_video && offre.company.presentation_video.thumbnails && offre.company.presentation_video.thumbnails[0] && offre.company.presentation_video.thumbnails[0].sizes[3]) ? offre.company.presentation_video.thumbnails[0].sizes[3].link : DefaultUrl
|
||||
const imgUrlOffre = (offre && offre.video && offre.video.thumbnails && offre.video.thumbnails[0] && offre.video.thumbnails[0].sizes[3]) ? offre.video.thumbnails[0].sizes[3].link : DefaultUrl
|
||||
const imgUrlDesktopOffre = (offre && offre.video && offre.video.thumbnails && offre.video.thumbnails[0] && offre.video.thumbnails[0].sizes[4]) ? offre.video.thumbnails[0].sizes[4].link : DefaultUrl
|
||||
console.log("COCOCOCOCOCOCOCOCOCCO");
|
||||
console.log(offre.video);
|
||||
const imgUrlDesktopOffre = (offre && offre.video && offre.video.thumbnails && offre.video.thumbnails[0] && offre.video.thumbnails[0].sizes[3]) ? offre.video.thumbnails[0].sizes[3].link : DefaultUrl
|
||||
const imgUrlTerritoire = (offre.territories && offre.territories[0] && offre.territories[0].territory && offre.territories[0].territory.presentation_video.thumbnails && offre.territories[0].territory.presentation_video.thumbnails[0] && offre.territories[0].territory.presentation_video.thumbnails[0].sizes[3]) ? offre.territories[0].territory.presentation_video.thumbnails[0].sizes[3].link : DefaultUrl
|
||||
const imgUrlDesktopTerritoire = (offre.territories && offre.territories[0] && offre.territories[0].territory.presentation_video && offre.territories[0].territory.presentation_video.thumbnails && offre.territories[0].territory.presentation_video.thumbnails[0] && offre.territories[0].territory.presentation_video.thumbnails[0].sizes[4]) ? offre.territories[0].territory.presentation_video.thumbnails[0].sizes[4].link : DefaultUrl
|
||||
const imgUrlDesktopTerritoire = (offre.territories && offre.territories[0] && offre.territories[0].territory.presentation_video && offre.territories[0].territory.presentation_video.thumbnails && offre.territories[0].territory.presentation_video.thumbnails[0] && offre.territories[0].territory.presentation_video.thumbnails[0].sizes[3]) ? offre.territories[0].territory.presentation_video.thumbnails[0].sizes[3].link : DefaultUrl
|
||||
const socialShareUrl = typeof window !== 'undefined' ? window.location : publicRuntimeConfig.frontServerUrl + `/Offre/${offre.id}-${_.kebabCase(offre.title)}`;
|
||||
const entrepriseLink = (offre.company && `/Entreprise/${offre.company.id}-${_.kebabCase(offre.company.brand_name)}`);
|
||||
const territoryVideoUrlTab = (offre.territories && offre.territories[0] && offre.territories[0].territory) ? offre.territories[0].territory.presentation_video.cdn_url.split('/') : '';
|
||||
const territoryVideoId = territoryVideoUrlTab[2]
|
||||
let descriptionSEO = offre.company && offre.company.brand_name+ " recrute en vidéo un(e) "+offre.title+", "+(offre.location && offre.location.gmap_address.formatted_address)+". Envoyez votre candidature en vidéo. "
|
||||
let titleSEO = "Offre d'emploi vidéo "+offre.title+" - "+(offre.company && offre.company.brand_name)+", "+(offre.location && offre.location.gmap_address.formatted_address)+" | Talents Tube "
|
||||
let jobVille=""
|
||||
let jobDpt=""
|
||||
let jobPays=""
|
||||
@@ -763,7 +753,7 @@ function OffreDetail(props) {
|
||||
{/* <a href={entrepriseLink}> */}
|
||||
{/* const entrepriseLink = (offre.company && `/Entreprise/${offre.company.id}-${_.kebabCase(offre.company.brand_name)}`); */}
|
||||
|
||||
<Link href={`/Player?id=/Offre/${offre.id}-${_.kebabCase(offre.title)}&videoId=${Ar.last(_.split(offre.company.presentation_video.cdn_url, '/'))}&type=Entreprise`} >
|
||||
<Link href={`/Player?id=${offre.company.id}&url=/Offre/${offre.id}-${_.kebabCase(offre.title)}&videoId=${Ar.last(_.split(offre.company.presentation_video.cdn_url, '/'))}&type=Entreprise&nameCompany=${offre.company.brand_name}&nameOffre=`} >
|
||||
<div className={classes.discoverContainerImage}>
|
||||
<img src={isWidthUp('sm', props.width) ? imgUrlDesktop : imgUrl} alt={offre.company.brand_name && offre.company.brand_name} />
|
||||
<Typography variant="h3" component="h3" gutterBottom className={ classes.voirEntreprise} align="center">
|
||||
@@ -844,7 +834,7 @@ function OffreDetail(props) {
|
||||
{/* <VideoVimeo {...isCandidature == 'true' ? 'classes={{ video: classes.videoOffre }}' : ''} videoId={Ar.last(_.split(offre.video.cdn_url, '/'))} autoplay='1' /> */}
|
||||
<div className={classes.contentContainer}>
|
||||
|
||||
<Link href={`/Player?id=/Offre/${offre.id}-${_.kebabCase(offre.title)}&videoId=${Ar.last(_.split(offre.video.cdn_url, '/'))}&type=Offre`} >
|
||||
<Link href={`/Player?id=${offre.id}&url=/Offre/${offre.id}-${_.kebabCase(offre.title)}&videoId=${Ar.last(_.split(offre.video.cdn_url, '/'))}&type=Offre&nameCompany=${offre.company && offre.company.brand_name}&nameOffre=${offre.title}`} >
|
||||
<div className={classes.discoverContainerImage}>
|
||||
<img src={isWidthUp('sm', props.width) ? imgUrlDesktopOffre : imgUrlOffre} alt={offre.company.brand_name && offre.company.brand_name} />
|
||||
<div className={classes.containerPoste}>
|
||||
@@ -892,7 +882,7 @@ function OffreDetail(props) {
|
||||
{/* <a href={entrepriseLink}> */}
|
||||
{/* const entrepriseLink = (offre.company && `/Entreprise/${offre.company.id}-${_.kebabCase(offre.company.brand_name)}`); */}
|
||||
|
||||
<Link href={`/Player?id=/Offre/${offre.id}-${_.kebabCase(offre.title)}&videoId=${Ar.last(_.split(offre.company.presentation_video.cdn_url, '/'))}&type=Entreprise`} >
|
||||
<Link href={`/Player?id=${offre.company.id}&url=/Offre/${offre.id}-${_.kebabCase(offre.title)}&videoId=${Ar.last(_.split(offre.company.presentation_video.cdn_url, '/'))}&type=Entreprise&nameCompany=${offre.company.brand_name}&nameOffre=`} >
|
||||
<div className={classes.discoverContainerImage}>
|
||||
<img src={isWidthUp('sm', props.width) ? imgUrlDesktop : imgUrl} alt={offre.company.brand_name && offre.company.brand_name} />
|
||||
<Typography variant="h3" component="h3" gutterBottom className={ classes.voirEntreprise} align="center">
|
||||
@@ -912,7 +902,7 @@ function OffreDetail(props) {
|
||||
{offre.territories && territoryVideoId && (
|
||||
<div className={classes.container + ' ' + classes.discoverContainerTerritory}>
|
||||
<section>
|
||||
<Link href={`/Player?id=/Offre/${offre.id}-${_.kebabCase(offre.title)}&videoId=${territoryVideoId}&type=Territoire`} >
|
||||
<Link href={`/Player?id=${offre.territories[0].territory.id}&url=/Offre/${offre.id}-${_.kebabCase(offre.title)}&videoId=${territoryVideoId}&type=Territoire&nameCompany=${offre.territories[0].territory.brand_name}&nameOffre=`} >
|
||||
<div className={classes.discoverContainerImage}>
|
||||
<img src={isWidthUp('sm', props.width) ? imgUrlDesktopTerritoire : imgUrlTerritoire} alt={(!!!offre.territories) ? offre.territories[0].territory.brand_name : ''} />
|
||||
<Typography variant="h3" component="h3" gutterBottom className={classes.title + ' ' + classes.voirTerritoire} align="center">
|
||||
@@ -998,7 +988,7 @@ function OffreDetail(props) {
|
||||
<Hidden mdUp>
|
||||
<section className={classes.contentContainerMobile}>
|
||||
|
||||
<Link href={`/Player?id=/Offre/${offre.id}-${_.kebabCase(offre.title)}&videoId=${Ar.last(_.split(offre.video && offre.video.cdn_url, '/'))}&type=Offre`} >
|
||||
<Link href={`/Player?id=${offre.id}&url=/Offre/${offre.id}-${_.kebabCase(offre.title)}&videoId=${Ar.last(_.split(offre.video && offre.video.cdn_url, '/'))}&type=Offre&nameCompany=${offre.company && offre.company.brand_name}&nameOffre=${offre.title}`} >
|
||||
<div className={classes.discoverContainerImage}>
|
||||
<img src={isWidthUp('xs', props.width) ? imgUrlDesktopOffre : imgUrlOffre} alt={offre.company && offre.company.brand_name && offre.company.brand_name} />
|
||||
<div >
|
||||
@@ -1062,7 +1052,7 @@ function OffreDetail(props) {
|
||||
{/* <a href={entrepriseLink}> */}
|
||||
{/* const entrepriseLink = (offre.company && `/Entreprise/${offre.company.id}-${_.kebabCase(offre.company.brand_name)}`); */}
|
||||
|
||||
<Link href={`/Player?id=/Offre/${offre.id}-${_.kebabCase(offre.title)}&videoId=${Ar.last(_.split(offre.company.presentation_video.cdn_url, '/'))}&type=Entreprise`} >
|
||||
<Link href={`/Player?id=${offre.company.id}&url=/Offre/${offre.id}-${_.kebabCase(offre.title)}&videoId=${Ar.last(_.split(offre.company.presentation_video.cdn_url, '/'))}&type=Entreprise&nameCompany=${offre.company.brand_name}&nameOffre=`} >
|
||||
<div className={classes.discoverContainerImage}>
|
||||
<img src={isWidthUp('xs', props.width) ? imgUrlDesktop : imgUrl} alt={offre.company.brand_name && offre.company.brand_name} />
|
||||
<Typography variant="h3" component="h3" gutterBottom className={ classes.voirEntrepriseMobile} align="center">
|
||||
@@ -1082,7 +1072,7 @@ function OffreDetail(props) {
|
||||
{offre.territories && territoryVideoId && (
|
||||
<div className={classes.container + ' ' + classes.discoverContainerTerritory}>
|
||||
<section>
|
||||
<Link href={`/Player?id=/Offre/${offre.id}-${_.kebabCase(offre.title)}&videoId=${territoryVideoId}&type=Territoire`} >
|
||||
<Link href={`/Player?id=${offre.territories[0].territory.id}&url=/Offre/${offre.id}-${_.kebabCase(offre.title)}&videoId=${territoryVideoId}&type=Territoire&nameCompany=${offre.territories[0].territory.brand_name}&nameOffre=${offre.title}`} >
|
||||
<div className={classes.discoverContainerImage}>
|
||||
<img src={isWidthUp('sm', props.width) ? imgUrlDesktopTerritoire : imgUrlTerritoire} alt={(!!!offre.territories) ? offre.territories[0].territory.brand_name : ''} />
|
||||
<Typography variant="h3" component="h3" gutterBottom className={classes.title + ' ' + classes.voirTerritoireMobile} align="center">
|
||||
|
||||
@@ -46,16 +46,16 @@ module.exports = withPlugins(
|
||||
// frontServerUrl: 'http://localhost:3000',
|
||||
// cvThequeUrl: 'https://recruteur.talentstube.com',
|
||||
// PROD
|
||||
symphonyUrl: 'https://recruteur.talentstube.com/',
|
||||
blogUrl: 'https://blog.talentstube.com',
|
||||
frontServerUrl: 'https://www.talentstube.com/',
|
||||
cvThequeUrl: 'https://recruteur.talentstube.com',
|
||||
// PRE PROD
|
||||
// symphonyUrl: 'https://pp.talentstube.com/',
|
||||
// symphonyUrl: 'https://recruteur.talentstube.com/',
|
||||
// blogUrl: 'https://blog.talentstube.com',
|
||||
// frontServerUrl: 'https://pp.app.talentstube.com/',
|
||||
// frontServerUrl: 'https://www.talentstube.com/',
|
||||
// cvThequeUrl: 'https://recruteur.talentstube.com',
|
||||
version : 'V2.5.4',
|
||||
// PRE PROD
|
||||
symphonyUrl: 'https://pp.talentstube.com/',
|
||||
blogUrl: 'https://blog.talentstube.com',
|
||||
frontServerUrl: 'https://pp.app.talentstube.com/',
|
||||
cvThequeUrl: 'https://recruteur.talentstube.com',
|
||||
version : 'V2.6.1',
|
||||
adListDefaultUrl: '/statique/images/default/default_picture_company.jpg',
|
||||
cachedMediaUrl: '/media/cache/profile_thumb/uploads/img/',
|
||||
postedContentUrl: '/uploads/img/',
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@
|
||||
"next-optimized-images": "^1.4.1",
|
||||
"next-redux-saga": "^4.0.2",
|
||||
"next-redux-wrapper": "^3.0.0-alpha.2",
|
||||
"next-seo": "^4.7.3",
|
||||
"next-seo": "^4.18.0",
|
||||
"next-transpile-modules": "^2.3.1",
|
||||
"node-mailjet": "^3.3.1",
|
||||
"nodemailer": "^4.6.8",
|
||||
|
||||
@@ -1072,8 +1072,8 @@ class Entreprise extends React.Component {
|
||||
|
||||
return (
|
||||
<RootContainer>
|
||||
<OgHead seo_title={company.brand_name && company.brand_name+" recrute des candidats en vidéo | Talents Tube"}
|
||||
seo_description={"Découvrez l'entreprise "+descriptionCompany +" et ses offres en vidéo - "+descriptionVille+ ". Envoyez votre candidature spontanée en vidéo."}
|
||||
<OgHead seo_title={company.brand_name && company.brand_name+" recrute des candidats en vidéo"}
|
||||
seo_description={"Découvrez l'entreprise "+descriptionCompany +" et ses offres d'emploi en vidéo - "+descriptionVille+ ". Envoyez votre candidature spontanée en vidéo."}
|
||||
seo_url={socialShareUrl}
|
||||
image={imgUrlDesktopSEO}
|
||||
></OgHead>
|
||||
@@ -1091,7 +1091,7 @@ class Entreprise extends React.Component {
|
||||
{/* {company.presentation_video && <Suspense fallback={renderLoader()}><VideoVimeo videoId={Ar.last(_.split(company.presentation_video.cdn_url, '/'))} autoplay='1' /></Suspense>} */}
|
||||
<div className={classes.contentContainer}>
|
||||
{company.presentation_video &&
|
||||
<Link href={`/Player?id=/Entreprise/${company.id}-${_.kebabCase(company.brand_name)}&videoId=${Ar.last(_.split(company.presentation_video.cdn_url, '/'))}&type=Entreprise`} >
|
||||
<Link href={`/Player?id=${company.id}&url=/Entreprise/${company.id}-${_.kebabCase(company.brand_name)}&videoId=${Ar.last(_.split(company.presentation_video.cdn_url, '/'))}&type=Entreprise&nameCompany=${company.brand_name}&nameOffre=`} >
|
||||
<div className={classes.discoverContainerImage}>
|
||||
<img src={ imgUrl} alt={company.brand_name && company.brand_name} />
|
||||
<div className={classes.containerPoste}>
|
||||
@@ -1145,7 +1145,7 @@ class Entreprise extends React.Component {
|
||||
!_.isEmpty(company.territories) ? (
|
||||
<div className={classes.container}>
|
||||
<section>
|
||||
<Link href={`/Player?id=/Entreprise/${company.id}-${_.kebabCase(company.brand_name)}&videoId=${territoryVideoId}&type=Territoire`} >
|
||||
<Link href={`/Player?id=${company.territories[0].territory.id}&url=/Entreprise/${company.id}-${_.kebabCase(company.brand_name)}&videoId=${territoryVideoId}&type=Territoire&nameCompany=${company.territories[0].territory.brand_name}&nameOffre=`} >
|
||||
<div className={classes.discoverContainerImage}>
|
||||
<img src={isWidthUp('sm', this.props.width) ? imgUrlDesktopTerritoire : imgUrlTerritoire} alt={(!!!company.territories) ? company.territories[0].territory.brand_name : ''} />
|
||||
<Typography variant="h3" component="h3" gutterBottom className={classes.title + ' ' + classes.voirTerritoire} align="center">
|
||||
@@ -1230,7 +1230,7 @@ class Entreprise extends React.Component {
|
||||
<Hidden mdUp>
|
||||
<section className={classes.contentContainerMobile}>
|
||||
{company.presentation_video &&
|
||||
<Link href={`/Player?id=/Entreprise/${company.id}-${_.kebabCase(company.brand_name)}&videoId=${Ar.last(_.split(company.presentation_video.cdn_url, '/'))}&type=Entreprise`} >
|
||||
<Link href={`/Player?id=${company.id}&url=/Entreprise/${company.id}-${_.kebabCase(company.brand_name)}&videoId=${Ar.last(_.split(company.presentation_video.cdn_url, '/'))}&type=Entreprise&nameCompany=${company.brand_name}&nameOffre=`} >
|
||||
<div className={classes.discoverContainerImage}>
|
||||
<img src={isWidthUp('xs', this.props.width) ? imgUrlDesktop : imgUrl} alt={company.brand_name && company.brand_name} />
|
||||
<div className={classes.containerPoste}>
|
||||
@@ -1339,7 +1339,7 @@ class Entreprise extends React.Component {
|
||||
!_.isEmpty(company.territories) ? (
|
||||
<div className={classes.containerMobile}>
|
||||
<section>
|
||||
<Link href={`/Player?id=/Entreprise/${company.id}-${_.kebabCase(company.brand_name)}&videoId=${territoryVideoId}&type=Territoire`} >
|
||||
<Link href={`/Player?id=${company.territories[0].territory.id}&url=/Entreprise/${company.id}-${_.kebabCase(company.brand_name)}&videoId=${territoryVideoId}&type=Territoire&nameCompany=${company.territories[0].territory.brand_name}`} >
|
||||
<div className={classes.discoverContainerImage}>
|
||||
<img src={isWidthUp('sm', this.props.width) ? imgUrlDesktopTerritoire : imgUrlTerritoire} alt={(!!!company.territories) ? company.territories[0].territory.brand_name : ''} />
|
||||
<Typography variant="h3" component="h3" gutterBottom className={classes.title + ' ' + classes.voirTerritoire} align="center">
|
||||
|
||||
@@ -40,8 +40,8 @@ class Offre extends React.Component {
|
||||
const { classes, offre } = this.props;
|
||||
descriptionSEO=""
|
||||
offre.company && offre.company.brand_name ? descriptionSEO += offre.company.brand_name : ""
|
||||
descriptionSEO += " recrute en vidéo un(e) "+offre.title
|
||||
titleSEO = "Offre d'emploi vidéo "+offre.title
|
||||
descriptionSEO += " recrute un(e) "+offre.title+", "+(offre.location && offre.location.gmap_address.formatted_address)+". Envoyez votre candidature vidéo"
|
||||
titleSEO = "Offre d'emploi "+offre && offre.title && offre.title.replace(' (F/H)', '')+", "+(offre.location && offre.location.gmap_address.formatted_address)+". Envoyez votre candidature vidéo"
|
||||
const socialShareUrl = typeof window !== 'undefined' ? window.location : publicRuntimeConfig.frontServerUrl + `Offre/${offre.id}-${_.kebabCase(offre.title)}`;
|
||||
const DefaultUrl = "https://blog.talentstube.com/wp-content/uploads/2021/01/default_picture_company.jpg"
|
||||
const imgUrl = (offre.company && offre.company.presentation_video && offre.company.presentation_video.thumbnails && offre.company.presentation_video.thumbnails[0] && offre.company.presentation_video.thumbnails[0].sizes[3]) ? offre.company.presentation_video.thumbnails[0].sizes[3].link : DefaultUrl
|
||||
|
||||
+62
-16
@@ -1,13 +1,17 @@
|
||||
import React, { Component, Fragment,lazy, Suspense } from 'react';
|
||||
import React, { Component, Fragment,lazy, Suspense, useEffect } from 'react';
|
||||
import { withStyles } from '@material-ui/core/styles';
|
||||
import Typography from '@material-ui/core/Typography'
|
||||
import LayoutBackUrl from '../components/templates/LayoutBackUrl';
|
||||
import RootContainer from '../components/atoms/RootContainer'
|
||||
import Router from 'next/router';
|
||||
import Head from 'next/head'
|
||||
// const VideoVimeo = lazy(() => import('../components/atoms/VideoVimeo'));
|
||||
import VideoVimeo from '../components/atoms/VideoVimeo';
|
||||
import queryString from 'query-string';
|
||||
import { fetchJobRequest, clearAd, countAdViewRequest } from '../actions/ads'
|
||||
const renderLoader = () => <p>Chargement</p>;
|
||||
import { NextSeo } from 'next-seo';
|
||||
import dynamic from 'next/dynamic'
|
||||
const styles = theme => ({
|
||||
player: {
|
||||
background:'#1E2327',
|
||||
@@ -49,31 +53,73 @@ const styles = theme => ({
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
let params = dynamic( () => window.location.search, {ssr: false} )
|
||||
class Player extends Component {
|
||||
constructor(props)
|
||||
{
|
||||
super(props);
|
||||
var today = new Date(),
|
||||
date = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate();
|
||||
|
||||
this.state = {
|
||||
date: date
|
||||
};
|
||||
|
||||
console.log("LOCATION SEARCH");
|
||||
console.log(params);
|
||||
}
|
||||
render() {
|
||||
const { classes } = this.props
|
||||
const params = queryString.parse(location.search);
|
||||
console.log(params.id);
|
||||
console.log(params.type);
|
||||
console.log(params.videoId);
|
||||
let url = params.id;
|
||||
const { classes, id, url, typeEntite, videoId, nameCompany, nameOffre } = this.props
|
||||
|
||||
|
||||
console.log(id);
|
||||
console.log(typeEntite);
|
||||
let typeVideo= null;
|
||||
let titleVideo= null;
|
||||
let descriptionVideo= null;
|
||||
if(typeEntite=="Offre"){
|
||||
titleVideo=nameCompany+" recrute un(e)"+nameOffre
|
||||
descriptionVideo=nameCompany+" recrute en vidéo un(e)"+nameOffre
|
||||
}else if(typeEntite=="Entreprise"){
|
||||
titleVideo="Découvrez l'entreprise "+nameCompany+" et ses offres d'emploi vidéo"
|
||||
descriptionVideo="Découvrez l'entreprise "+nameCompany+" et ses offres d'emploi vidéo. Envoyez votre candidature spontanée en vidéo"
|
||||
}else if(typeEntite=="Territoire"){
|
||||
titleVideo="Découvrez le territoire "+nameCompany
|
||||
descriptionVideo="Découvrez le territoire "+nameCompany
|
||||
}
|
||||
console.log(videoId);
|
||||
|
||||
return (
|
||||
<LayoutBackUrl text="Player" url={url} >
|
||||
|
||||
|
||||
<VideoVimeo classes={{ video: classes.video }} videoId={params.videoId} options="" autoplay='1' />
|
||||
|
||||
</LayoutBackUrl>
|
||||
<RootContainer>
|
||||
<NextSeo
|
||||
title={titleVideo}
|
||||
description={descriptionVideo}
|
||||
openGraph={{
|
||||
title: titleVideo,
|
||||
description: descriptionVideo,
|
||||
url: "https://www.talentstube.com/Player?id="+id+"&url="+url+"&videoId="+videoId+"&type="+typeEntite+"&nameCompany="+nameCompany+"&nameOffre="+nameOffre,
|
||||
type: 'video.movie',
|
||||
video: {
|
||||
// Multiple Open Graph actors is only available in version `7.0.2-canary.35`+ of next
|
||||
releaseDate: this.state.date,
|
||||
// Multiple Open Graph tags is only available in version `7.0.2-canary.35`+ of next
|
||||
},
|
||||
site_name: 'Talents Tube',
|
||||
}}
|
||||
/>
|
||||
<LayoutBackUrl text="Player" url={url} >
|
||||
<VideoVimeo classes={{ video: classes.video }} videoId={videoId} options="" autoplay='1' />
|
||||
</LayoutBackUrl>
|
||||
</RootContainer>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Player.getInitialProps = function (context) {
|
||||
|
||||
let { id, videoId,type } = context.query;
|
||||
let { id, url,videoId,typeEntite, nameCompany, nameOffre } = context.query;
|
||||
let {res} = context;
|
||||
return {};
|
||||
return {id:id, url:url, videoId:videoId, typeEntite:typeEntite, nameCompany:nameCompany, nameOffre:nameOffre};
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -168,7 +168,7 @@ app.prepare()
|
||||
|
||||
server.get('/Player', (req, res) => {
|
||||
const actualPage = '/Player'
|
||||
const queryParams = { id: req.query.id, videoId:req.query.videoId, type:req.query.type }
|
||||
const queryParams = { id: req.query.id, url: req.query.url, videoId:req.query.videoId, typeEntite:req.query.type, nameCompany:req.query.nameCompany, nameOffre:req.query.nameOffre }
|
||||
app.render(req, res, actualPage, queryParams)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user