File tree Expand file tree Collapse file tree 4 files changed +8
-7
lines changed
Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ const App = () => {
2727 const [ loading , setLoading ] = useState ( true ) ;
2828 const [ searchParams ] = useSearchParams ( ) ;
2929
30- const scrollToExplore = ( ) => {
31- const exploreContent = document . getElementById ( "explore " ) ;
30+ const scrollToFooter = ( ) => {
31+ const exploreContent = document . getElementById ( "footer " ) ;
3232 if ( exploreContent ) {
3333 exploreContent . scrollIntoView ( { behavior : "smooth" } ) ;
3434 }
@@ -102,7 +102,7 @@ const App = () => {
102102 return (
103103 < AntdApp >
104104 < Layout style = { { minHeight : "100vh" } } >
105- < Navbar scrollToExplore = { scrollToExplore } />
105+ < Navbar scrollToFooter = { scrollToFooter } />
106106 < Content >
107107 < Routes >
108108 < Route
@@ -116,7 +116,7 @@ const App = () => {
116116 background : backgroundColor ,
117117 } }
118118 >
119- < Row id = "explore" >
119+ < Row >
120120 < Col xs = { 24 } sm = { 8 } >
121121 < Row
122122 style = { {
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ const CustomFooter: React.FC = () => {
2222
2323 return (
2424 < Footer
25+ id = "footer"
2526 style = { {
2627 background : "#1b2540" ,
2728 color : "white" ,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import ToggleDarkMode from "./ToggleDarkMode";
1414
1515const { useBreakpoint } = Grid ;
1616
17- function Navbar ( { scrollToExplore } : { scrollToExplore : any } ) {
17+ function Navbar ( { scrollToFooter } : { scrollToFooter : any } ) {
1818 const [ hovered , setHovered ] = useState <
1919 null | "home" | "explore" | "help" | "github" | "join"
2020 > ( null ) ;
@@ -143,7 +143,7 @@ function Navbar({ scrollToExplore }: { scrollToExplore: any }) {
143143 ...menuItemStyle ( "explore" , false ) ,
144144 cursor : "pointer" ,
145145 } }
146- onClick = { scrollToExplore }
146+ onClick = { scrollToFooter }
147147 onMouseEnter = { ( ) => setHovered ( "explore" ) }
148148 onMouseLeave = { ( ) => setHovered ( null ) }
149149 >
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ vi.mock("../../components/ToggleDarkMode", () => ({
1111const renderNavbar = ( ) => {
1212 render (
1313 < MemoryRouter >
14- < Navbar scrollToExplore = { ( ) => { } } />
14+ < Navbar scrollToFooter = { ( ) => { } } />
1515 </ MemoryRouter >
1616 ) ;
1717} ;
You can’t perform that action at this time.
0 commit comments