Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Second[Agent] upgrade next.js #196

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .babelrc

This file was deleted.

4 changes: 2 additions & 2 deletions .storybook/Decorators/i18next.provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { I18nextProvider } from "react-i18next";
import i18n from "i18next";
import Backend from "i18next-xhr-backend";
import { initReactI18next } from "react-i18next";
const path = require("path");
import path from "path";

i18n.use(initReactI18next)
.use(Backend)
Expand All @@ -22,6 +22,6 @@ i18n.use(initReactI18next)
}
});

export const withI18next = () => (story: any) => {
export const withI18next = () => (story) => {
return <I18nextProvider i18n={i18n}>{story()}</I18nextProvider>;
};
5 changes: 3 additions & 2 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const path = require("path");
module.exports = {
import path from "path";

export default {
stories: ["../src/**/*.stories.[tj]s[x]"],
addons: [
"@storybook/addon-actions/register",
Expand Down
64 changes: 30 additions & 34 deletions documentation/website/core/Footer.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';

const React = require('react');

const docs = require("../docs.json");
const docs = require('../docs.json');

class Footer extends React.Component {

constructor() {
super();
this.state = {
docs
}
docs,
};
}

docUrl(doc, language) {
Expand Down Expand Up @@ -46,27 +38,27 @@ class Footer extends React.Component {
</a>
<div>
<h5>Docs</h5>
{
this.state.docs.map((doc, index) => (
<a key={index} href={this.docUrl(`${doc.id}.html`, this.props.language)}>
{doc.title}
</a>
))
}
{this.state.docs.map((doc, index) => (
<a
key={index}
href={this.docUrl(`${doc.id}.html`, this.props.language)}
>
{doc.title}
</a>
))}
</div>
<div>
<h5>Community</h5>
{
this.props.config.socialMediaUrl.map((url, index) => (
<a
key={index}
href={url.url}
target="_blank"
rel="noreferrer noopener">
{url.title}
</a>
))
}
{this.props.config.socialMediaUrl.map((url, index) => (
<a
key={index}
href={url.url}
target="_blank"
rel="noreferrer noopener"
>
{url.title}
</a>
))}
</div>
<div>
<h5>More</h5>
Expand All @@ -78,7 +70,8 @@ class Footer extends React.Component {
data-count-href="/facebook/docusaurus/stargazers"
data-show-count="true"
data-count-aria-label="# stargazers on GitHub"
aria-label="Star this project on GitHub">
aria-label="Star this project on GitHub"
>
Star
</a>
</div>
Expand All @@ -88,17 +81,20 @@ class Footer extends React.Component {
href="https://github.com/pankod/next-boilerplate"
target="_blank"
rel="noreferrer noopener"
className="fbOpenSource">
className="fbOpenSource"
>
<img
src={`${this.props.config.baseUrl}img/pankod_footer_logo.png`}
alt="Pankod Open Source"
width="170"
/>
</a>
<section className="copyright">{this.props.config.copyright}</section>
<section className="copyright">
{this.props.config.copyright}
</section>
</footer>
);
}
}

module.exports = Footer;
export default Footer;
77 changes: 37 additions & 40 deletions documentation/website/pages/en/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,50 +5,47 @@
* LICENSE file in the root directory of this source tree.
*/

const React = require('react');
import React from 'react';

const CompLibrary = require('../../core/CompLibrary.js');

const Container = CompLibrary.Container;
const GridBlock = CompLibrary.GridBlock;
import { Container, GridBlock } from '../../core/CompLibrary.js';

function Help(props) {
const { config: siteConfig, language = '' } = props;
const { baseUrl, docsUrl } = siteConfig;
const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`;
const langPart = `${language ? `${language}/` : ''}`;
const docUrl = doc => `${baseUrl}${docsPart}${langPart}${doc}`;
const { config: siteConfig, language = '' } = props;
const { baseUrl, docsUrl } = siteConfig;
const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`;
const langPart = `${language ? `${language}/` : ''}`;
const docUrl = doc => `${baseUrl}${docsPart}${langPart}${doc}`;

const supportLinks = [
{
content: `Learn more using the [documentation on this site.](${docUrl(
'doc1.html',
)})`,
title: 'Browse Docs',
},
{
content: 'Ask questions about the documentation and project',
title: 'Join the community',
},
{
content: "Find out what's new with this project",
title: 'Stay up to date',
},
];
const supportLinks = [
{
content: `Learn more using the [documentation on this site.](${docUrl(
'doc1.html',
)})`,
title: 'Browse Docs',
},
{
content: 'Ask questions about the documentation and project',
title: 'Join the community',
},
{
content: "Find out what's new with this project",
title: 'Stay up to date',
},
];

return (
<div className="docMainWrapper wrapper">
<Container className="mainContainer documentContainer postContainer">
<div className="post">
<header className="postHeader">
<h1>Need help?</h1>
</header>
<p>This project is maintained by a dedicated group of people.</p>
<GridBlock contents={supportLinks} layout="threeColumn" />
</div>
</Container>
</div>
);
return (
<div className="docMainWrapper wrapper">
<Container className="mainContainer documentContainer postContainer">
<div className="post">
<header className="postHeader">
<h1>Need help?</h1>
</header>
<p>This project is maintained by a dedicated group of people.</p>
<GridBlock contents={supportLinks} layout="threeColumn" />
</div>
</Container>
</div>
);
}

module.exports = Help;
export default Help;
Loading