Task: Add app provider and add config alias paths for tsconfig and removed React imported
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import './index.less'
|
||||
|
||||
export default function About() {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import './index.less'
|
||||
|
||||
export default function Home() {
|
||||
|
||||
5
src/provider/AppProvider.tsx
Normal file
5
src/provider/AppProvider.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
const AppProvider = (props: any) => {
|
||||
return <>{props.children}</>
|
||||
}
|
||||
|
||||
export default AppProvider
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'
|
||||
import { routes } from './routes'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user