|
@@ -1,6 +1,9 @@
|
|
|
-"use client";
|
|
|
+import { Link } from "@/i18n";
|
|
|
+import clsx from "clsx";
|
|
|
+import { useTranslations } from "next-intl";
|
|
|
import { FC, PropsWithChildren, ReactNode } from "react";
|
|
|
-
|
|
|
+import HeaderTitle from "./HerderTitle";
|
|
|
+import styles from "./style.module.scss";
|
|
|
/**
|
|
|
* @description HeaderProps
|
|
|
* @param {boolean} headerPlaceholder 是否展示展位元素
|
|
@@ -11,21 +14,23 @@ export interface HeaderProps {
|
|
|
headerRender?: () => ReactNode;
|
|
|
}
|
|
|
|
|
|
-import { useRouter } from "@/i18n";
|
|
|
-import clsx from "clsx";
|
|
|
-import styles from "./style.module.scss";
|
|
|
+const cs = clsx(["iconfont icon-gengduo", styles.menu]);
|
|
|
const DefaultHeader: FC = () => {
|
|
|
- const router = useRouter();
|
|
|
+ const t = useTranslations("Header");
|
|
|
return (
|
|
|
<div className={styles.headerMain}>
|
|
|
<div className={styles.headerLeft}>
|
|
|
- <div
|
|
|
- className="iconfont icon-gengduo"
|
|
|
- onClick={() => router.push("/project")}
|
|
|
- ></div>
|
|
|
+ <div className={cs}></div>
|
|
|
+ </div>
|
|
|
+ <HeaderTitle />
|
|
|
+ <div className={styles.headerRight}>
|
|
|
+ <div className={styles.right}>
|
|
|
+ <Link href={"/login"}>{t("login")}</Link>
|
|
|
+ <Link href={"/login"} className={styles.rightActive}>
|
|
|
+ {t("register")}
|
|
|
+ </Link>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div className={styles.headerTitle}></div>
|
|
|
- <div className={styles.headerRight}></div>
|
|
|
</div>
|
|
|
);
|
|
|
};
|