Skip to content

Commit

Permalink
feat: user guide bottom button
Browse files Browse the repository at this point in the history
  • Loading branch information
jimcase committed May 29, 2024
1 parent 04ef1a5 commit 51afda1
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions ui/summit-2024/src/pages/UserGuide/UserGuide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ import Ellipses from "../../assets/ellipse.svg";
import { useIsPortrait } from "../../common/hooks/useIsPortrait";
import { UserGuideCard } from "./components/UserGuideCard";
import { userGuideMenu } from "../../__fixtures__/userGuide";
import {CustomButton} from "../../components/common/CustomButton/CustomButton";
import {ROUTES} from "../../routes";
import { useNavigate } from "react-router-dom";


const UserGuide: React.FC = () => {
const navigate = useNavigate();
const userGuideMenuOptions = userGuideMenu;
const [selectedCategory, setSelectedCategory] = useState(
userGuideMenuOptions[0].label,
Expand All @@ -18,6 +23,10 @@ const UserGuide: React.FC = () => {
const submitVotesRef = useRef<HTMLElement>(null);
const howVoteRef = useRef<HTMLElement>(null);

const handleNavigate = (pathname: string) => {
navigate(pathname);
};

const handleClickMenuItem = (option: string) => {
setSelectedCategory(option);
if (option === userGuideMenu[0].label) {
Expand Down Expand Up @@ -296,6 +305,29 @@ const UserGuide: React.FC = () => {
);
})}
</Grid>
<Grid container spacing={2} justifyContent="center" sx={{
marginTop: "24px"
}}>
<Grid item sx={{
width: {
xs: "100%",
md: "auto"
}
}}>
<CustomButton
onClick={() => handleNavigate(ROUTES.CATEGORIES)}
colorVariant="primary"
sx={{
width: {
xs: "100%",
md: "auto"
}
}}
>
Vote Now
</CustomButton>
</Grid>
</Grid>
</Grid>
</Grid>
<img
Expand Down

0 comments on commit 51afda1

Please sign in to comment.