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 && ( <> + )} {isAuthenticated ? ( ) : ( @@ -82,62 +89,6 @@ export function MainHeader() { )}
- -
- - } - 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 && ( - <> - - - )} - {isAuthenticated && ( - - )} - {isAuthenticated ? ( - - ) : ( - - )}
);