simplified colouring current advice subheading
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Linna Luo 2021-08-22 21:36:27 -04:00
parent ebbd5ce7f5
commit c66fe32e9c
3 changed files with 3 additions and 30 deletions

View File

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

View File

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

View File

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