Skip to content

Commit

Permalink
feat: Update Sign Up
Browse files Browse the repository at this point in the history
  • Loading branch information
PintoGideon committed Nov 8, 2024
1 parent 44a7e02 commit 36f2dcb
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions src/components/Wrapper/Toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ import { useMediaQuery } from "react-responsive";
import { useLocation, useNavigate } from "react-router";
import ChrisAPIClient from "../../api/chrisapiclient";
import { clearCartOnLogout } from "../../store/cart/cartSlice";
import { useAppDispatch, useAppSelector } from "../../store/hooks";
import {
useAppDispatch,
useAppSelector,
useSignUpAllowed,
} from "../../store/hooks";
import { setLogoutSuccess } from "../../store/user/userSlice";
import { ThemeContext } from "../DarkTheme/useTheme";
import FeedDetails from "../FeedDetails";
Expand All @@ -34,7 +38,7 @@ const ToolbarComponent: React.FC<ToolbarComponentProps> = (
props: ToolbarComponentProps,
) => {
const isSmallerScreen = useMediaQuery({ maxWidth: 1224 });

const { signUpAllowed } = useSignUpAllowed();
const { token, titleComponent } = props;
const dispatch = useAppDispatch();
const navigate = useNavigate();
Expand Down Expand Up @@ -164,13 +168,15 @@ const ToolbarComponent: React.FC<ToolbarComponentProps> = (
>
Login
</Button>
<Button
style={{ padding: "0.25em" }}
variant="link"
onClick={() => navigate("/signup")}
>
Sign Up
</Button>
{signUpAllowed && (
<Button
style={{ padding: "0.25em" }}
variant="link"
onClick={() => navigate("/signup")}
>
Sign Up
</Button>
)}
</>
)}
</FlexItem>
Expand Down

0 comments on commit 36f2dcb

Please sign in to comment.