From e5d8cc2beaeb6ebf4a1c3d8d2fb1e96ce8b623dc Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Thu, 28 Dec 2023 15:16:29 -0500 Subject: [PATCH] Allow for Component Token Overrides. Signed-off-by: Dave Richer --- client/src/index.js | 18 +++++++-- client/src/landing/index.jsx | 77 +----------------------------------- 2 files changed, 17 insertions(+), 78 deletions(-) diff --git a/client/src/index.js b/client/src/index.js index 03216132c..ff900b727 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -1,6 +1,4 @@ import * as Sentry from "@sentry/react"; -//import "antd/dist/antd.css"; -// import "antd/dist/antd.less"; import Dinero from "dinero.js"; import React from "react"; import ReactDOM from "react-dom/client"; @@ -14,7 +12,10 @@ import { persistor, store } from "./redux/store"; import reportWebVitals from "./reportWebVitals"; import "./translations/i18n"; import "./utils/CleanAxios"; +import {ConfigProvider} from "antd"; //import { BrowserTracing } from "@sentry/tracing"; +//import "antd/dist/antd.css"; +// import "antd/dist/antd.less"; // Dinero.defaultCurrency = "CAD"; // Dinero.globalLocale = "en-CA"; @@ -60,7 +61,18 @@ function App() { ); } -ReactDOM.createRoot(document.getElementById('root')).render(); + +// Used for ANTD Component Tokens +// https://ant.design/docs/react/migrate-less-variables +const themeConfig = { +}; + + +ReactDOM.createRoot(document.getElementById('root')).render( + + + +); // const onServiceWorkerUpdate = (registration) => { diff --git a/client/src/landing/index.jsx b/client/src/landing/index.jsx index 4fcd55f19..7fbf1ec43 100644 --- a/client/src/landing/index.jsx +++ b/client/src/landing/index.jsx @@ -1,30 +1,15 @@ /* eslint no-undef: 0 */ /* eslint arrow-parens: 0 */ + import { enquireScreen } from "enquire-js"; import React from "react"; import Banner0 from "./Banner0"; -// import Content4 from "./Content4"; -//import Content0 from "./Content0"; -//import Content1 from "./Content1"; import { Banner00DataSource, - // Content40DataSource, - //Content00DataSource, - //Content10DataSource, - // Pricing11DataSource, - // Content30DataSource, - // Content120DataSource, Footer10DataSource, - // Nav00DataSource, - //Pricing20DataSource, } from "./data.source"; -// import Pricing1 from "./Pricing1"; -// import Content3 from "./Content3"; -// import Content12 from "./Content12"; import Footer1 from "./Footer1"; import "./less/antMotionStyle.less"; -// import Nav0 from "./Nav0"; -//import Pricing2 from "./Pricing2"; let isMobile; enquireScreen((b) => { @@ -38,17 +23,14 @@ export default class Home extends React.Component { super(props); this.state = { isMobile, - show: !location.port, // 如果不是 dva 2.0 请删除 + show: !location.port, }; } componentDidMount() { - // 适配手机屏幕; enquireScreen((b) => { this.setState({ isMobile: !!b }); }); - // dva 2.0 样式在组件渲染之后动态加载,导致滚动组件不生效;线上不影响; - /* 如果不是 dva 2.0 请删除 start */ if (location.port) { // 样式 build 时间在 200-300ms 之间; setTimeout(() => { @@ -57,69 +39,16 @@ export default class Home extends React.Component { }); }, 500); } - /* 如果不是 dva 2.0 请删除 end */ } render() { const children = [ - // , , - // ...(process.env.NODE_ENV !== "production" - // ? [ - // // , - // , - // , - // , - // // , - // // , - // // , - // ] - // : []), - {/* 如果不是 dva 2.0 替换成 {children} start */} {this.state.show && children} - {/* 如果不是 dva 2.0 替换成 {children} end */} ); }