-
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.
Merge pull request #166 from ystv/int-199-set-event-title-bars-to-the…
…-event-name [INT-199] Add titles to pages to differentiate tabs
- Loading branch information
Showing
16 changed files
with
140 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
import { PageInfo } from "@/components/PageInfo"; | ||
import { Button, Card, Stack } from "@mantine/core"; | ||
import Link from "next/link"; | ||
|
||
export const dynamic = "force-dynamic"; | ||
|
||
export default function AdminPage() { | ||
return ( | ||
<Card> | ||
<Stack> | ||
<Link href={"/admin/users"}> | ||
<Button variant="default">Users</Button> | ||
</Link> | ||
<Link href={"/admin/positions"}> | ||
<Button variant="default">Crew Positions</Button> | ||
</Link> | ||
<Link href={"/admin/roles"}> | ||
<Button variant="default">Roles</Button> | ||
</Link> | ||
</Stack> | ||
</Card> | ||
<> | ||
<PageInfo title="Admin" /> | ||
<Card> | ||
<Stack> | ||
<Link href={"/admin/users"}> | ||
<Button variant="default">Users</Button> | ||
</Link> | ||
<Link href={"/admin/positions"}> | ||
<Button variant="default">Crew Positions</Button> | ||
</Link> | ||
<Link href={"/admin/roles"}> | ||
<Button variant="default">Roles</Button> | ||
</Link> | ||
</Stack> | ||
</Card> | ||
</> | ||
); | ||
} |
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
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
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
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
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
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
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,30 @@ | ||
"use client"; | ||
|
||
import { Button } from "@mantine/core"; | ||
import { useRouter } from "next/navigation"; | ||
import { useEffect } from "react"; | ||
import { FaChevronLeft } from "react-icons/fa"; | ||
|
||
export function BackButton(props: { path?: string }) { | ||
const router = useRouter(); | ||
|
||
useEffect(() => { | ||
if (props.path) router.prefetch(props.path); | ||
}); | ||
|
||
return ( | ||
<Button | ||
onClick={() => { | ||
if (props.path) { | ||
router.push(props.path); | ||
} else { | ||
router.back(); | ||
} | ||
}} | ||
leftSection={<FaChevronLeft />} | ||
variant="subtle" | ||
> | ||
Back | ||
</Button> | ||
); | ||
} |
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,7 @@ | ||
"use client"; | ||
|
||
export function PageInfo(props: { title?: string }) { | ||
return ( | ||
<title>{`${props.title ? props.title + " | " : ""}YSTV Calendar`}</title> | ||
); | ||
} |