diff --git a/apps/web/src/app/main/layout/MainHeader.tsx b/apps/web/src/app/main/layout/MainHeader.tsx
index 03d0f00..d6d288f 100755
--- a/apps/web/src/app/main/layout/MainHeader.tsx
+++ b/apps/web/src/app/main/layout/MainHeader.tsx
@@ -29,33 +29,31 @@ export function MainHeader() {
-
-
-
- }
- placeholder="搜索课程"
- className="w-72 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 && (
<>
)}
-
-
-
- }
- placeholder="搜索课程"
- className="w-96 rounded-full"
- value={searchValue}
- onChange={(e) => setSearchValue(e.target.value)}
- onPressEnter={(e) => {
- if (!window.location.pathname.startsWith("/courses/")) {
- navigate(`/courses/`);
- window.scrollTo({
- top: 0,
- behavior: "smooth",
- });
- }
- }}
- />
-
- {isAuthenticated && (
- <>
-
{
- const url = id
- ? `/course/${id}/editor`
- : "/course/editor";
- navigate(url);
- }}
- className="flex items-center space-x-1 bg-gradient-to-r from-blue-500 to-blue-600 text-white hover:from-blue-600 hover:to-blue-700 border-none shadow-md hover:shadow-lg transition-all"
- icon={}>
- {id ? "编辑课程" : "创建课程"}
-
- >
- )}
- {isAuthenticated && (
-
{
- window.location.href = "/path/editor";
- }}
- icon={}>
- 创建学习路径
-
- )}
- {isAuthenticated ? (
-
- ) : (
-
navigate("/login")}
- className="flex items-center space-x-1 bg-gradient-to-r from-blue-500 to-blue-600 text-white hover:from-blue-600 hover:to-blue-700 border-none shadow-md hover:shadow-lg transition-all"
- icon={}>
- 登录
-
- )}
);