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
/.pnp
.pnp.js
/src/.umi/
# testing
/coverage

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB