refactor function components

This commit is contained in:
mattyl006 2022-07-06 13:49:41 +02:00
parent 8ac45fd04c
commit 0487e03c76
6 changed files with 29 additions and 4 deletions

View File

@ -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}>

View File

@ -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
View File

@ -0,0 +1,11 @@
import React from "react";
const Logo = () => {
return (
<>
</>
);
}
export default Logo;

14
src/components/NavBar.js Normal file
View 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;

View File

@ -1,6 +1,6 @@
import React from "react"; import React from "react";
function Challenges() { const Challenges = () => {
return ( return (
<> <>
Challenges Challenges

View File

@ -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'