diff --git a/src/component/LayoutCorporate.js b/src/component/LayoutCorporate.js index 139e605b..1e5316c7 100644 --- a/src/component/LayoutCorporate.js +++ b/src/component/LayoutCorporate.js @@ -1,7 +1,7 @@ import React from 'react'; import Helmet from 'react-helmet'; -import { Link } from 'gatsby'; +import { Link, withPrefix } from 'gatsby'; import Search from './corporate/search'; const WazoHeader = () => { diff --git a/src/component/provisioning/components/Vendors.js b/src/component/provisioning/components/Vendors.js index e6a09cf4..6ed0ee08 100644 --- a/src/component/provisioning/components/Vendors.js +++ b/src/component/provisioning/components/Vendors.js @@ -1,4 +1,5 @@ import React, { useState } from 'react'; +import { withPrefix } from "gatsby" import { buildTable } from '../helpers'; const slugify = require('../../../builder/slugify'); @@ -19,17 +20,17 @@ const Page = ({ plugins, images }) => { return Object.keys(plugins).map(vendor => (
- {vendor} + {vendor} {vendor === currentVendor &&
{Object.keys(plugins[vendor]).sort().map(name => { const id = `${slugify(vendor)}-${slugify(name)}`; return
- {name} + {name} {id === currentDevice &&
{name}
- {images[slugify(vendor)] && images[slugify(vendor)].indexOf(`${slugify(name)}.png`) !== -1 ? {`${slugify(vendor)}-${name}`}/ : {`${slugify(vendor)}-${name}`}} + {images[slugify(vendor)] && images[slugify(vendor)].indexOf(`${slugify(name)}.png`) !== -1 ? {`${slugify(vendor)}-${name}`}/ : {`${slugify(vendor)}-${name}`}}
{buildTable(plugins[vendor][name])}
} diff --git a/src/component/provisioning/phone.js b/src/component/provisioning/phone.js index 2f74e8ea..cf367727 100644 --- a/src/component/provisioning/phone.js +++ b/src/component/provisioning/phone.js @@ -1,23 +1,23 @@ import React from 'react'; +import { withPrefix } from "gatsby" import Layout from '../Layout'; import { buildTable } from './helpers'; import './provisioning.scss'; -import { withPrefix } from 'gatsby'; const slugify = require('../../builder/slugify'); -const vendorsUrl = '/uc-doc/ecosystem/supported_devices'; +const vendorsUrl = withPrefix('/uc-doc/ecosystem/supported_devices'); const Page = ({ pageContext: { name, vendor, phone, vendor_images } }) => { const breadcrumbs = [ { url: vendorsUrl, label: 'Provd plugins' }, - { url: `/provisioning/${slugify(vendor)}`, label: vendor }, + { url: withPrefix(`/provisioning/${slugify(vendor)}`), label: vendor }, ]; return ( - Provd Plugins > ${vendor} > ${name}`} breadcrumbs={breadcrumbs} currentPageName={name}> + Provd Plugins > ${vendor} > ${name}`} breadcrumbs={breadcrumbs} currentPageName={name}>
diff --git a/src/component/provisioning/vendor.js b/src/component/provisioning/vendor.js index 5f753747..563c7f64 100644 --- a/src/component/provisioning/vendor.js +++ b/src/component/provisioning/vendor.js @@ -1,10 +1,11 @@ import React from 'react'; +import { withPrefix } from "gatsby" import Layout from '../Layout'; import './provisioning.scss'; const slugify = require('../../builder/slugify'); -const vendorsUrl = '/uc-doc/ecosystem/supported_devices'; +const vendorsUrl = withPrefix('/uc-doc/ecosystem/supported_devices'); const breadcrumbs = [{ url: vendorsUrl, label: 'Provd plugins', @@ -19,12 +20,12 @@ const Page = ({ pageContext: { name, vendor_plugins, vendor_images } }) => ( {Object.keys(vendor_plugins).map(phoneName => (
diff --git a/src/component/tutorials/index.js b/src/component/tutorials/index.js index 61fd862b..28d0b3f1 100644 --- a/src/component/tutorials/index.js +++ b/src/component/tutorials/index.js @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import Layout from '../Layout'; -import { Link } from 'gatsby'; +import { Link, withPrefix } from 'gatsby'; const sortTutorials = (a) => a.sort((a, b) => { @@ -19,8 +19,8 @@ const Page = ({ pageContext: { tutorials: tutorialsRaw } }) => {
{tutorials.map(({ title, slug, author, summary, thumbnail }) => ( - -
+ +

{title}

{summary}...