Skip to content

Commit

Permalink
refactor: replace useQubicWallet with useWalletConnect in PrivateRout…
Browse files Browse the repository at this point in the history
…esGuard and HomePage components
  • Loading branch information
alexmf91 committed Oct 21, 2024
1 parent 0372b60 commit d6acb2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/guards/PrivateRoutesGuard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useQubicWallet } from '@app/hooks'
import { useWalletConnect } from '@app/hooks'
import { PublicRoutes } from '@app/router'
import type { ReactElement } from 'react'
import { Navigate, Outlet, useLocation } from 'react-router-dom'
Expand All @@ -10,7 +10,7 @@ interface PrivateRouteProps {
export default function PrivateRoutesGuard({
redirectTo = PublicRoutes.HOME
}: PrivateRouteProps): ReactElement {
const { isWalletConnected } = useQubicWallet()
const { isWalletConnected } = useWalletConnect()
const location = useLocation()

if (!isWalletConnected && location.pathname !== redirectTo) {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/home/HomePage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Button, ConnectWalletButton } from '@app/components/ui/buttons'
import { useQubicWallet } from '@app/hooks'
import { useWalletConnect } from '@app/hooks'
import { PrivateRoutes } from '@app/router'
import { clsxTwMerge } from '@app/utils'
import { PROPOSALS_MOCK } from '@app/utils/mocks'
Expand All @@ -13,7 +13,7 @@ const TABS = [{ i18nKey: 'active_proposals' }, { i18nKey: 'ended_proposals' }] a
type TabKey = (typeof TABS)[number]['i18nKey']

export default function HomePage() {
const { isWalletConnected } = useQubicWallet()
const { isWalletConnected } = useWalletConnect()
const [activeTab, setActiveTab] = useState<TabKey>(TABS[0].i18nKey)
const { t } = useTranslation()

Expand Down

0 comments on commit d6acb2e

Please sign in to comment.