aboutsummaryrefslogtreecommitdiff
path: root/src/components/Header.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Header.js')
-rw-r--r--src/components/Header.js21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/components/Header.js b/src/components/Header.js
index cd217fc..cca73ed 100644
--- a/src/components/Header.js
+++ b/src/components/Header.js
@@ -7,17 +7,24 @@ import {
} from "@material-ui/core";
import styled from 'styled-components';
-const Header = () => (
+const Header = ({ setPage }) => {
+
+ const handleChange = (event, newPage) => {
+ setPage(newPage);
+ };
+
+ return (
<AppBar position="static">
- <TabsWrapper>
+ <TabsWrapper onChange={handleChange}>
<Typography variant="h4" id="logo"> ChronoCube </Typography>
- <Tab label="Home" />
- <Tab label="App" />
- <Tab label="Scoreboard" />
- <Tab label="News" />
+ <Tab label="Home" value="home"/>
+ <Tab label="App" value="app"/>
+ <Tab label="Scoreboard" value="scoreboard"/>
+ <Tab label="News" value="news"/>
</TabsWrapper>
</AppBar>
-);
+ );
+};
const TabsWrapper = styled(Tabs)`
border-bottom: 1px solid black;