Skip to content

Commit 039824b

Browse files
authored
Merge pull request #780 from WatchItDev/app/open/ownership/verified
feat: open ownership section to verified accounts
2 parents d7349a9 + aa483e1 commit 039824b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/pages/ownership.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,25 @@ import { GLOBAL_CONSTANTS } from '@src/config-global.ts';
66
import { OgMetaTags } from '@src/components/og-meta-tags.tsx';
77
import { OwnershipView } from '@src/sections/ownership/index';
88
import { useAuth } from '@src/hooks/use-auth.ts';
9-
import {canViewSection} from "@src/layouts/can-view-section.tsx"
9+
import { useIsVerified } from '@src/hooks/protocol/use-is-verified.ts';
10+
import { Address } from 'viem';
11+
import { LoadingScreen } from '@src/components/loading-screen';
12+
1013
// ----------------------------------------------------------------------
1114

1215
export default function FileManagerPage() {
13-
const { session: sessionData } = useAuth();
16+
const { session: sessionData, isAuthLoading } = useAuth();
17+
const { isVerified, loading } = useIsVerified(sessionData?.address as Address);
18+
19+
if ((loading && sessionData.authenticated) || isAuthLoading) return <LoadingScreen />;
1420

1521
return (
1622
<OgMetaTags
1723
title="Watchit: Ownership (COMING SOON)"
1824
description="Manage digital rights, track licensing, and unlock the power of decentralized ownership."
1925
url={`${GLOBAL_CONSTANTS.BASE_URL}/ownership/`}
2026
>
21-
{canViewSection(sessionData) ? (
27+
{isVerified && sessionData.address ? (
2228
<>
2329
<Header>
2430
<HeaderContent title="Ownership" />

0 commit comments

Comments
 (0)