From a47dc540b16011cffba3cc60aaac230ff0581bf8 Mon Sep 17 00:00:00 2001
From: longdayi <13477510+longdayilongdayi@user.noreply.gitee.com>
Date: Thu, 27 Feb 2025 21:57:05 +0800
Subject: [PATCH] 02272157
---
apps/web/src/app/main/layout/MainHeader.tsx | 127 ++++++++++----------
apps/web/src/index.css | 4 -
2 files changed, 64 insertions(+), 67 deletions(-)
diff --git a/apps/web/src/app/main/layout/MainHeader.tsx b/apps/web/src/app/main/layout/MainHeader.tsx
index d6d288f..22e6bcd 100755
--- a/apps/web/src/app/main/layout/MainHeader.tsx
+++ b/apps/web/src/app/main/layout/MainHeader.tsx
@@ -10,7 +10,6 @@ import { useNavigate, useParams, useSearchParams } from "react-router-dom";
import { UserMenu } from "./UserMenu/UserMenu";
import { NavigationMenu } from "./NavigationMenu";
import { useMainContext } from "./MainProvider";
-import { Header } from "antd/es/layout/layout";
export function MainHeader() {
const { isAuthenticated, user } = useAuth();
@@ -19,77 +18,79 @@ export function MainHeader() {
const { searchValue, setSearchValue } = useMainContext();
return (
-
-
-
-
navigate("/")}
- className="text-2xl font-bold bg-gradient-to-r from-primary-600 via-primary-500 to-primary-400 bg-clip-text text-transparent hover:scale-105 transition-transform cursor-pointer">
- 烽火慕课
-
+
+
+
navigate("/")}
+ className="text-2xl font-bold bg-gradient-to-r from-primary-600 via-primary-500 to-primary-400 bg-clip-text text-transparent hover:scale-105 transition-transform cursor-pointer">
+ 烽火慕课
+
+
+
-
-
+
+ }
+ placeholder="搜索课程"
+ className="w-96 rounded-full"
+ value={searchValue}
+ onChange={(e) => setSearchValue(e.target.value)}
+ onPressEnter={(e) => {
+ if (
+ !window.location.pathname.startsWith("/courses/") &&
+ !window.location.pathname.startsWith("my")
+ ) {
+ navigate(`/courses/`);
+ window.scrollTo({
+ top: 0,
+ behavior: "smooth",
+ });
}
- placeholder="搜索课程"
- className="w-96 rounded-full"
- value={searchValue}
- onChange={(e) => setSearchValue(e.target.value)}
- onPressEnter={(e) => {
- if (
- !window.location.pathname.startsWith("/courses/") &&
- !window.location.pathname.startsWith("my")
- ) {
- navigate(`/courses/`);
- window.scrollTo({
- top: 0,
- behavior: "smooth",
- });
- }
- }}
- />
-
- {isAuthenticated && (
- <>
-
- >
- )}
- {isAuthenticated && (
+ }}
+ />
+
+ {isAuthenticated && (
+ <>
- )}
- {isAuthenticated ? (
-
- ) : (
-
- )}
-
+ >
+ )}
+ {isAuthenticated && (
+
+ )}
+ {isAuthenticated ? (
+
+ ) : (
+
+ )}
+
);
}
diff --git a/apps/web/src/index.css b/apps/web/src/index.css
index f65bd8b..34de7f4 100755
--- a/apps/web/src/index.css
+++ b/apps/web/src/index.css
@@ -161,7 +161,3 @@
/* 去除最后一行的底部边框 */
}
-.mind-editor {
- height: calc(100vh - 285px);
- width: 100%;
-}
\ No newline at end of file