This commit is contained in:
NICE CODE BY DEV 2022-08-04 17:05:48 +08:00
parent 551793c036
commit 48a580cffe
9 changed files with 17 additions and 8 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@
/node_modules /node_modules
/.pnp /.pnp
.pnp.js .pnp.js
/src/.umi/
# testing # testing
/coverage /coverage

View File

@ -14,7 +14,12 @@ module.exports = (nextConfig = {}) => {
cssModules, cssModules,
cssLoaderOptions, cssLoaderOptions,
postcssLoaderOptions, postcssLoaderOptions,
lessLoaderOptions = {}, lessLoaderOptions = {
lessOptions: {
strictMath: true,
noIeCompat: true
}
},
} = nextConfig; } = nextConfig;
options.defaultLoaders.less = cssLoaderConfig(config, { options.defaultLoaders.less = cssLoaderConfig(config, {

View File

@ -15,11 +15,11 @@
"prettier": "prettier --write 'src/**/*.{less,css,md,json}'" "prettier": "prettier --write 'src/**/*.{less,css,md,json}'"
}, },
"dependencies": { "dependencies": {
"antd": "^100.0.1",
"axios": "^0.21.1", "axios": "^0.21.1",
"next": "10.0.4", "next": "10.0.4",
"normalize.css": "^8.0.1", "normalize.css": "^8.0.1",
"react": "17.0.1", "react": "17.0.1",
"antd": "^4.22.3",
"react-dom": "17.0.1" "react-dom": "17.0.1"
}, },
"devDependencies": { "devDependencies": {

View File

@ -1,3 +1,5 @@
.container { .container {
margin: auto;
width: 500px; width: 500px;
text-align: center;
} }

View File

@ -5,9 +5,7 @@ import styles from './index.less';
const Demo: React.FunctionComponent = () => { const Demo: React.FunctionComponent = () => {
return ( return (
<div className={styles.container}> <div className={styles.container}>
<h1>title</h1> <Button type='primary'></Button>
<p>demo</p>
<Button>Button</Button>
</div> </div>
); );
}; };

View File

@ -5,14 +5,14 @@ interface PageHeaderProps {
title?: string; title?: string;
} }
const PageHeader: React.FC<PageHeaderProps> = ({ title = 'Uni-Ubi' }) => { const PageHeader: React.FC<PageHeaderProps> = ({ title = 'dev' }) => {
return ( return (
<div> <div>
<Head> <Head>
<title>{title}</title> <title>{title}</title>
<link <link
rel="icon" rel="icon"
href={require('../../../public/favicon.ico')} // href={require('@static/favicon.ico')}
/> />
</Head> </Head>
</div> </div>

View File

@ -2,9 +2,11 @@ import BasicLayout from '@/layouts/BasicLayout';
import Demo from '@/components/Demo'; import Demo from '@/components/Demo';
export default function Home() { export default function Home() {
console.log(process.env.CLIENT_BASE_API)
return ( return (
<BasicLayout> <BasicLayout>
<h1></h1> <h1 style={{ textAlign: 'center' }}>nicecode</h1>
<Demo /> <Demo />
</BasicLayout> </BasicLayout>
); );

View File

@ -1,3 +1,4 @@
// @ts-ignore
import axios from 'axios'; import axios from 'axios';
// create an axios instance // create an axios instance

View File

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB