Task: Add app provider and add config alias paths for tsconfig and removed React imported

This commit is contained in:
2021-06-12 17:38:19 +07:00
parent 371b4fad15
commit 26451a4291
12 changed files with 40 additions and 15 deletions

View File

@@ -1,10 +1,10 @@
import React from 'react'
import AppProvider from '@/provider/AppProvider'
import RouterView from '../routes'
import './App.css'
import './App.less'
const App = () => {
return (
<RouterView />
<AppProvider><RouterView /></AppProvider>
)
}

View File

@@ -1,7 +1,7 @@
import React from 'react'
import ReactDOM from 'react-dom'
import './index.css'
import App from './app/App'
import './index.less'
import App from '@/app/App'
import reportWebVitals from './reportWebVitals'
ReactDOM.render(

View File

@@ -1,4 +1,3 @@
import React from 'react'
import './index.less'
export default function About() {

View File

@@ -1,4 +1,3 @@
import React from 'react'
import './index.less'
export default function Home() {

View File

@@ -0,0 +1,5 @@
const AppProvider = (props: any) => {
return <>{props.children}</>
}
export default AppProvider

View File

@@ -1,4 +1,3 @@
import React from 'react'
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'
import { routes } from './routes'