diff --git a/packages/frontend/src/design-system/components/common/Header/Header.css.ts b/packages/frontend/src/design-system/components/common/Header/Header.css.ts index 5ff748f6..bc25372a 100644 --- a/packages/frontend/src/design-system/components/common/Header/Header.css.ts +++ b/packages/frontend/src/design-system/components/common/Header/Header.css.ts @@ -1,6 +1,7 @@ import { style } from "@vanilla-extract/css"; import color from "../../../tokens/color"; +import typography from "../../../tokens/typography"; import { border, flexAlignCenter, widthMax } from "../../../tokens/utils.css"; export const borderBottom = border.bottom; @@ -15,3 +16,14 @@ export const container = style([ backgroundColor: color.$semantic.bgDefault, }, ]); + +export const actionGroup = style([flexAlignCenter, { gap: 4 }]); + +export const tutorialButton = style([ + typography.$semantic.body2Regular, + { + border: 0, + backgroundColor: "transparent", + color: color.$scale.grey700, + }, +]); diff --git a/packages/frontend/src/design-system/components/common/Header/Header.tsx b/packages/frontend/src/design-system/components/common/Header/Header.tsx index 64c37bbc..7ef83b2d 100644 --- a/packages/frontend/src/design-system/components/common/Header/Header.tsx +++ b/packages/frontend/src/design-system/components/common/Header/Header.tsx @@ -1,6 +1,9 @@ import Image from "next/image"; import Link from "next/link"; +import { useRouter } from "next/router"; +import { BROWSWER_PATH } from "../../../../constants/path"; +import { useQuizCoachActionContext } from "../../../../contexts/QuizCoachContext"; import { ColorTheme } from "../../../../hooks/useTheme"; import classnames from "../../../../utils/classnames"; import { header as headerLayout } from "../../../tokens/layout.css"; @@ -13,6 +16,10 @@ export default function Header() { const headerStyle = classnames(styles.borderBottom, headerLayout); const { colorTheme } = useThemeContext(); + const router = useRouter(); + const { handleStart } = useQuizCoachActionContext(); + const quizPage = router.pathname.startsWith(`${BROWSWER_PATH.QUIZZES}/`); + const imgMap = { light: "/light-logo.svg", dark: "/dark-logo.svg", @@ -26,7 +33,18 @@ export default function Header() { Git Challenge - +
+ {quizPage && ( + + )} + +
);