Skip to content

Commit

Permalink
Guardarian button on sidebar - to be reverted
Browse files Browse the repository at this point in the history
  • Loading branch information
ikprk committed Jun 26, 2024
1 parent eed3bf0 commit 5848c0e
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ import {
SvgSidebarToken,
} from '@/assets/icons'
import { AppLogo } from '@/components/AppLogo'
import { FlexBox } from '@/components/FlexBox'
import { Button } from '@/components/_buttons/Button'
import { atlasConfig } from '@/config'
import { absoluteRoutes } from '@/config/routes'
import { getCorrectLoginModal } from '@/providers/auth/auth.helpers'
import { useAuthStore } from '@/providers/auth/auth.store'
import { useTransactionManagerStore } from '@/providers/transactions/transactions.store'
import { useUser } from '@/providers/user/user.hooks'
import { square } from '@/styles'

Expand Down Expand Up @@ -76,16 +78,22 @@ export const SidenavViewer: FC = () => {
} = useAuthStore()
const hasAtLeastOneChannel = !!activeMembership?.channels.length && activeMembership?.channels.length >= 1

const setGuardarianModal = useTransactionManagerStore((state) => state.actions.setGuardarianModal)
const { isLoggedIn } = useUser()

const closeAndSignIn = () => {
setExpanded(false)
setAuthModalOpenName(getCorrectLoginModal())
}
const buttonsContent = !isLoggedIn ? (
<Button icon={<SvgActionMember />} onClick={closeAndSignIn}>
Sign in
</Button>
<FlexBox gap={4} width="100%" flow="column">
<Button fullWidth variant="secondary" icon={<SvgActionMoney />} onClick={() => setGuardarianModal(true)}>
Guardarian
</Button>
<Button fullWidth icon={<SvgActionMember />} onClick={closeAndSignIn}>
Sign in
</Button>
</FlexBox>
) : hasAtLeastOneChannel ? (
<Button
variant="secondary"
Expand Down

0 comments on commit 5848c0e

Please sign in to comment.