refactor function components
This commit is contained in:
parent
8ac45fd04c
commit
0487e03c76
@ -4,7 +4,7 @@ import LandingPage from "./pages/LandingPage";
|
|||||||
import Challenges from "./pages/Challenges";
|
import Challenges from "./pages/Challenges";
|
||||||
import {BrowserRouter, Route, Routes} from "react-router-dom";
|
import {BrowserRouter, Route, Routes} from "react-router-dom";
|
||||||
|
|
||||||
function App() {
|
const App = () => {
|
||||||
return (
|
return (
|
||||||
<BrowserRouter>
|
<BrowserRouter>
|
||||||
<ThemeProvider theme={theme}>
|
<ThemeProvider theme={theme}>
|
||||||
|
@ -18,7 +18,7 @@ const ButtonLinkStyle = styled(Label)`
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
function ButtonLink(props) {
|
const ButtonLink = (props) => {
|
||||||
return (
|
return (
|
||||||
<ButtonLinkStyle>
|
<ButtonLinkStyle>
|
||||||
{props.children}
|
{props.children}
|
||||||
|
11
src/components/Logo.js
Normal file
11
src/components/Logo.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const Logo = () => {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Logo;
|
14
src/components/NavBar.js
Normal file
14
src/components/NavBar.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import React from "react";
|
||||||
|
import {Container, FlexRow} from "../utils/containers";
|
||||||
|
|
||||||
|
const NavBar = () => {
|
||||||
|
return (
|
||||||
|
<Container as='header'>
|
||||||
|
<FlexRow as='nav'>
|
||||||
|
|
||||||
|
</FlexRow>
|
||||||
|
</Container>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default NavBar;
|
@ -1,6 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
function Challenges() {
|
const Challenges = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
Challenges
|
Challenges
|
||||||
|
@ -5,7 +5,7 @@ import theme from "../utils/theme";
|
|||||||
import {Link} from "react-router-dom";
|
import {Link} from "react-router-dom";
|
||||||
import ButtonLink from "../components/ButtonLink";
|
import ButtonLink from "../components/ButtonLink";
|
||||||
|
|
||||||
function LandingPage() {
|
const LandingPage = () => {
|
||||||
return (
|
return (
|
||||||
<FlexColumn alignmentY='flex-start' setWidth='100%' setMinHeight='100vh' as='main'>
|
<FlexColumn alignmentY='flex-start' setWidth='100%' setMinHeight='100vh' as='main'>
|
||||||
<FlexColumn alignmentX='flex-start' setGap='24px'
|
<FlexColumn alignmentX='flex-start' setGap='24px'
|
||||||
|
Loading…
Reference in New Issue
Block a user