diff --git a/nextjs-javascript/README.md b/nextjs-javascript/README.md index cc74e6c..678e5f0 100644 --- a/nextjs-javascript/README.md +++ b/nextjs-javascript/README.md @@ -3,8 +3,8 @@ ## How to start 1. Install dependencies `npm install`. -1. Copy `charting_library` folder from https://github.com/tradingview/charting_library/ to `/static` folders. The earliest supported version of the Charting Library is 17. If you get 404 then you need to [request an access to this repository](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/). -1. Copy `datafeeds` folder from https://github.com/tradingview/charting_library/ to `/static`. +1. Copy `charting_library` folder from https://github.com/tradingview/charting_library/ to `/public/static` folders. The earliest supported version of the Charting Library is 17. If you get 404 then you need to [request an access to this repository](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/). +1. Copy `datafeeds` folder from https://github.com/tradingview/charting_library/ to `/public/static`. 1. Run `npm run build` and `npm run start`. It will build the project and open a default browser with the Charting Library. 1. Run `npm run dev` when you start to develop with this project. diff --git a/nextjs-javascript/components/TVChartContainer/index.jsx b/nextjs-javascript/components/TVChartContainer/index.jsx index 554562b..e4465fd 100644 --- a/nextjs-javascript/components/TVChartContainer/index.jsx +++ b/nextjs-javascript/components/TVChartContainer/index.jsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import './index.css'; -import { widget } from '../../static/charting_library'; +import styles from './index.module.css'; +import { widget } from '../../public/static/charting_library'; function getLanguageFromURL() { const regex = new RegExp('[\\?&]lang=([^&#]*)'); @@ -79,7 +79,7 @@ export class TVChartContainer extends React.PureComponent { return (
); } diff --git a/nextjs-javascript/components/TVChartContainer/index.css b/nextjs-javascript/components/TVChartContainer/index.module.css similarity index 100% rename from nextjs-javascript/components/TVChartContainer/index.css rename to nextjs-javascript/components/TVChartContainer/index.module.css diff --git a/nextjs-javascript/next.config.js b/nextjs-javascript/next.config.js index c2464ae..f053ebf 100644 --- a/nextjs-javascript/next.config.js +++ b/nextjs-javascript/next.config.js @@ -1,8 +1 @@ -const withCSS = require('@zeit/next-css'); - -/* Without CSS Modules, with PostCSS */ -module.exports = withCSS({ - webpack: function(config) { - return config; - }, -}); +module.exports = {}; diff --git a/nextjs-javascript/package.json b/nextjs-javascript/package.json index a180a11..e969dae 100644 --- a/nextjs-javascript/package.json +++ b/nextjs-javascript/package.json @@ -7,13 +7,12 @@ "start": "next start" }, "dependencies": { - "@zeit/next-css": "^1.0.2-canary.2", - "next": "^9.0.6", - "react": "^16.8.0", - "react-dom": "^16.8.0" + "next": "^10.1.3", + "react": "^17.0.2", + "react-dom": "^17.0.2" }, "license": "ISC", "devDependencies": { - "prettier": "^1.18.2" + "prettier": "^2.2.1" } } diff --git a/nextjs-javascript/static/.gitkeep b/nextjs-javascript/public/static/.gitkeep similarity index 100% rename from nextjs-javascript/static/.gitkeep rename to nextjs-javascript/public/static/.gitkeep