diff --git a/apps/u3/src/container/community/CommunityLayout.tsx b/apps/u3/src/container/community/CommunityLayout.tsx index 0afd5d0f..0dc066f9 100644 --- a/apps/u3/src/container/community/CommunityLayout.tsx +++ b/apps/u3/src/container/community/CommunityLayout.tsx @@ -13,8 +13,10 @@ import useLoadCommunityMembers from '@/hooks/community/useLoadCommunityMembers'; import useLoadCommunityTopMembers from '@/hooks/community/useLoadCommunityTopMembers'; import { CommunityInfo } from '@/services/community/types/community'; import { fetchCommunity } from '@/services/community/api/community'; +import useLogin from '@/hooks/shared/useLogin'; export default function CommunityLayout() { + const { isLogin, login } = useLogin(); const { channelId } = useParams(); const [communityLoading, setCommunityLoading] = useState(true); @@ -42,6 +44,9 @@ export default function CommunityLayout() { setDefaultPostChannelId, userChannels, joinChannel, + currFid, + openFarcasterQR, + isConnected: isLoginFarcaster, } = useFarcasterCtx(); useEffect(() => { @@ -108,6 +113,14 @@ export default function CommunityLayout() { { + if (!isLogin) { + login(); + return; + } + if (!isLoginFarcaster) { + openFarcasterQR(); + return; + } setJoining(true); await joinChannel(parentUrl); await new Promise((resolve) => {