Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const App = () => {
const [loading, setLoading] = useState(true);
const [searchParams] = useSearchParams();

const scrollToExplore = () => {
const exploreContent = document.getElementById("explore");
const scrollToFooter = () => {
const exploreContent = document.getElementById("footer");
if (exploreContent) {
exploreContent.scrollIntoView({ behavior: "smooth" });
}
Expand Down Expand Up @@ -104,7 +104,7 @@ const App = () => {
return (
<AntdApp>
<Layout style={{ minHeight: "100vh" }}>
<Navbar scrollToExplore={scrollToExplore} />
<Navbar scrollToFooter={scrollToFooter} />
<Content>
<Routes>
<Route
Expand All @@ -118,7 +118,7 @@ const App = () => {
background: backgroundColor,
}}
>
<Row id="explore">
<Row>
<Col xs={24} sm={8}>
<Row
style={{
Expand Down
1 change: 1 addition & 0 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const CustomFooter: React.FC = () => {

return (
<Footer
id="footer"
style={{
background: "#1b2540",
color: "white",
Expand Down
4 changes: 2 additions & 2 deletions src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {

const { useBreakpoint } = Grid;

function Navbar({ scrollToExplore }: { scrollToExplore: any }) {
function Navbar({ scrollToFooter }: { scrollToFooter: any }) {
const [hovered, setHovered] = useState<
null | "home" | "explore" | "help" | "github" | "join"
>(null);
Expand Down Expand Up @@ -142,7 +142,7 @@ function Navbar({ scrollToExplore }: { scrollToExplore: any }) {
...menuItemStyle("explore", false),
cursor: "pointer",
}}
onClick={scrollToExplore}
onClick={scrollToFooter}
onMouseEnter={() => setHovered("explore")}
onMouseLeave={() => setHovered(null)}
>
Expand Down
2 changes: 1 addition & 1 deletion src/tests/components/Navbar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MemoryRouter } from "react-router-dom";
const renderNavbar = () => {
render(
<MemoryRouter>
<Navbar scrollToExplore={() => {}} />
<Navbar scrollToFooter={() => {}} />
</MemoryRouter>
);
};
Expand Down