generated from melaasar/template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add skeleton navbar and routing capability (#35)
* feat: add skeleton navbar and routing capability * style: add missing semicolon in index.tsx * style: add missing semicolon in LandingPage.tsx
- Loading branch information
Showing
12 changed files
with
115 additions
and
75 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import React from 'react'; | ||
|
||
const NotFoundPage: React.FC = () => <p>404: Not Found</p>; | ||
|
||
export default NotFoundPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react'; | ||
import axios from 'axios'; | ||
|
||
const apiCall = () => { | ||
axios.get('http://localhost:9000').then((data) => { | ||
console.log(data.data); | ||
}) | ||
} | ||
|
||
const LandingPage: React.FC = () => { | ||
return ( | ||
<div> | ||
<button onClick={apiCall}>Get a message from Mickey!</button> | ||
</div> | ||
); | ||
} | ||
|
||
export default LandingPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from 'react'; | ||
import { NavLink } from 'react-router-dom'; | ||
|
||
const Navbar: React.FC = () => { | ||
return ( | ||
<nav> | ||
<NavLink to="/"><p>Home</p></NavLink> | ||
<NavLink to="/profile"><p>Profile</p></NavLink> | ||
</nav> | ||
); | ||
} | ||
|
||
export default Navbar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.info-container { | ||
margin: auto; | ||
width: 50%; | ||
border-style: solid; | ||
border-color: black; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from 'react'; | ||
import './ProfilePage.css'; | ||
|
||
const ProfilePage: React.FC = () => { | ||
return ( | ||
<div className="info-container"> | ||
<p>Name: Mickey Mouse</p> | ||
<p>Email: [email protected]</p> | ||
</div> | ||
); | ||
} | ||
|
||
export default ProfilePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.