Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gfashioin-fe
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Enju Zhang
gfashioin-fe
Commits
67d14d5d
Commit
67d14d5d
authored
May 09, 2020
by
imtiny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add basic route and simple home page
parent
397414c8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
49 deletions
+29
-49
App.tsx
src/App.tsx
+19
-49
index.css
src/pages/Home/index.css
+0
-0
index.tsx
src/pages/Home/index.tsx
+10
-0
No files found.
src/App.tsx
View file @
67d14d5d
import
React
from
'react'
;
import
logo
from
'./logo.svg'
;
import
{
Counter
}
from
'./features/counter/Counter'
;
import
'./App.css'
;
import
{
BrowserRouter
as
Router
,
Route
,
Switch
}
from
"react-router-dom"
;
import
Home
from
'./pages/Home'
;
const
NotFound
=
()
=>
{
return
(
<
div
>
<
h1
>
Notfound page
</
h1
>
</
div
>
)
}
function
App
()
{
return
(
<
div
className=
"App"
>
<
header
className=
"App-header"
>
<
img
src=
{
logo
}
className=
"App-logo"
alt=
"logo"
/>
<
Counter
/>
<
p
>
Edit
<
code
>
src/App.tsx
</
code
>
and save to reload.
</
p
>
<
span
>
<
span
>
Learn
</
span
>
<
a
className=
"App-link"
href=
"https://reactjs.org/"
target=
"_blank"
rel=
"noopener noreferrer"
>
React
</
a
>
<
span
>
,
</
span
>
<
a
className=
"App-link"
href=
"https://redux.js.org/"
target=
"_blank"
rel=
"noopener noreferrer"
>
Redux
</
a
>
<
span
>
,
</
span
>
<
a
className=
"App-link"
href=
"https://redux-toolkit.js.org/"
target=
"_blank"
rel=
"noopener noreferrer"
>
Redux Toolkit
</
a
>
,
<
span
>
and
</
span
>
<
a
className=
"App-link"
href=
"https://react-redux.js.org/"
target=
"_blank"
rel=
"noopener noreferrer"
>
React Redux
</
a
>
</
span
>
</
header
>
<
Router
>
<
div
>
<
Switch
>
<
Route
exact
path=
'/'
component=
{
Home
}
/>
<
Route
component=
{
NotFound
}
/>
</
Switch
>
</
div
>
</
Router
>
);
}
...
...
src/pages/Home/index.css
0 → 100644
View file @
67d14d5d
src/pages/Home/index.tsx
0 → 100644
View file @
67d14d5d
import
React
from
'react'
;
import
'./index.css'
;
export
default
()
=>
{
return
(
<
div
>
<
h1
>
Home page111
</
h1
>
</
div
>
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment