-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from aanndch/feature/navbar
Navbar and Footer changes
- Loading branch information
Showing
4 changed files
with
123 additions
and
101 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,19 +1,24 @@ | ||
import { Link } from "gatsby"; | ||
import React from "react"; | ||
import React, { useState } from "react"; | ||
import { ModeToggle } from "./ModeToggle"; | ||
import DatePicker from "./DatePicker"; | ||
import { toZonedTime } from "date-fns-tz"; | ||
|
||
export default function Header() { | ||
return ( | ||
<> | ||
<div className="container mx-auto"> | ||
<nav className="flex justify-between py-3 "> | ||
<div className="uppercase font-bold">Pokerogue Daily Runs</div> | ||
<div className="flex gap-4 items-center"> | ||
<Link to="/">Homepage</Link> | ||
<ModeToggle /> | ||
</div> | ||
</nav> | ||
</div> | ||
</> | ||
); | ||
const [date, setDate] = useState<Date>( | ||
toZonedTime(new Date(Date.now()), "UTC") | ||
); | ||
|
||
return ( | ||
<div className="container mx-auto"> | ||
<nav className="flex flex-col justify-between items-center gap-3 py-4 md:flex-row"> | ||
<div className="uppercase font-bold">Pokerogue Daily Runs</div> | ||
<div className="flex gap-6 items-center"> | ||
<Link to="/">Home</Link> | ||
<ModeToggle /> | ||
<DatePicker date={date} onDateChange={setDate} /> | ||
</div> | ||
</nav> | ||
</div> | ||
); | ||
} |
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