Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
innovatixhub authored Nov 26, 2024
1 parent 069cc52 commit c76506f
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { useTranslation } from "react-i18next";
import { useSelector } from "react-redux";
import { Link } from "react-router-dom";
import useSignOut from "src/Hooks/App/useSignOut";
import SvgIcon from "../../MiniComponents/SvgIcon";
import s from "./AuthSideBarButtons.module.scss";

const AuthSideBarButtons = () => {
const { loginInfo } = useSelector((state) => state.user);
const { isSignIn } = loginInfo;
const handleSignOut = useSignOut();
const { t } = useTranslation();

return (
<>
{isSignIn && (
<button
className={s.signOutButton}
type="button"
onClick={handleSignOut}
>
<SvgIcon name="boxArrowRight" />
<span>{t("mobileNav.signOut")}</span>
</button>
)}

{!isSignIn && (
<Link to="/signup" className={s.signOutButton}>
<SvgIcon name="boxArrowRight" />
<span>{t("mobileNav.signIn")}</span>
</Link>
)}
</>
);
};

export default AuthSideBarButtons;
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.signOutButton {
all: unset;
-webkit-tap-highlight-color: transparent;
color: var(--medium-light-gray);
padding: 10px;
min-width: 126px;
display: flex;
align-items: center;
border-radius: 10px;
cursor: pointer;
outline: solid 2px transparent;
transition: background-color .2s, outline-color .2s;

&[class=active],
&:hover {
background-color: rgba(87, 87, 87, .5);
}

&[class=active]:hover {
background-color: rgba(87, 87, 87, .8);
}

&:focus-visible {
outline-color: var(--white);
}
}

.signOutButton span {
padding-inline-start: 16px;
}

.signOutButton svg {
fill: var(--white);
width: 20px;
height: 20px;
}

0 comments on commit c76506f

Please sign in to comment.