|
|
|
@ -1,4 +1,5 @@ |
|
|
|
|
import Link from "next/link"; |
|
|
|
|
import { useRouter } from "next/router"; |
|
|
|
|
import React, { ReactNode } from "react"; |
|
|
|
|
|
|
|
|
|
import { Image } from "@/components/Image"; |
|
|
|
@ -16,6 +17,8 @@ export default function CoopAdvice() { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export function Advice(props: { children: ReactNode }) { |
|
|
|
|
const router = useRouter(); |
|
|
|
|
const path = router.pathname; |
|
|
|
|
return ( |
|
|
|
|
<> |
|
|
|
|
<div className={styles.titleContainer}> |
|
|
|
@ -24,13 +27,31 @@ export function Advice(props: { children: ReactNode }) { |
|
|
|
|
</div> |
|
|
|
|
<div className={styles.adviceBarContainer}> |
|
|
|
|
<Link href="/resources/advice/coop"> |
|
|
|
|
<a className={styles.currentAdvice}>Coop Advice</a> |
|
|
|
|
<a |
|
|
|
|
className={ |
|
|
|
|
path == "/resources/advice/coop" ? styles.currentAdvice : "" |
|
|
|
|
} |
|
|
|
|
> |
|
|
|
|
Coop Advice |
|
|
|
|
</a> |
|
|
|
|
</Link> |
|
|
|
|
<Link href="/resources/advice/academic"> |
|
|
|
|
<a>Academic Advice</a> |
|
|
|
|
<a |
|
|
|
|
className={ |
|
|
|
|
path == "/resources/advice/academic" ? styles.currentAdvice : "" |
|
|
|
|
} |
|
|
|
|
> |
|
|
|
|
Academic Advice |
|
|
|
|
</a> |
|
|
|
|
</Link> |
|
|
|
|
<Link href="/resources/advice/misc"> |
|
|
|
|
<a>Additional Resources</a> |
|
|
|
|
<a |
|
|
|
|
className={ |
|
|
|
|
path == "/resources/advice/misc" ? styles.currentAdvice : "" |
|
|
|
|
} |
|
|
|
|
> |
|
|
|
|
Additional Resources |
|
|
|
|
</a> |
|
|
|
|
</Link> |
|
|
|
|
</div> |
|
|
|
|
<div className={styles.content}>{props.children}</div> |
|
|
|
|