Skip to content

Commit

Permalink
chore: remove useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
Daydreamer-riri committed Jul 31, 2024
1 parent 92510fa commit 68578dc
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions examples/styled-components/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,16 @@ const pages = import.meta.glob<any>('./pages/**/*.tsx')
const children: RouteRecord[] = Object.entries(pages).map(([filepath, component]) => {
let path = filepath.split('/pages')[1]
path = path.split('.')[0].replace('index', '')
const entry = `src${filepath.slice(1)}`

if (path.endsWith('/')) {
return {
index: true,
Component: React.lazy(component),
entry,
}
}
return {
path,
Component: React.lazy(component),
entry,
}
})

Expand Down

0 comments on commit 68578dc

Please sign in to comment.