Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hellno committed Aug 31, 2023
1 parent 92cc9fd commit c926907
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/common/components/FarcasterLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,9 @@ const FarcasterLogin = () => {

const onPollingUpdate = async () => {
const accounts = useAccountStore.getState().accounts;
// console.log('onPollingUpdate accounts', accounts);

const pendingAccounts = accounts.filter((account) => account.status === AccountStatusType.pending);
const hasPendingNewAccounts = !isEmpty(pendingAccounts);

// console.log('onPollingUpdate');
if (hasPendingNewAccounts && !isSignupDone) {
pendingAccounts.forEach(async (account, idx) => {
if (!account.id) return;
Expand All @@ -67,7 +64,6 @@ const FarcasterLogin = () => {

useLayoutEffect(() => {
return () => {
console.log('cleanup LayoutEffect')
setRunPolling(false);
}
}, [runPolling])
Expand Down Expand Up @@ -109,6 +105,8 @@ const FarcasterLogin = () => {
navigate('/post');
}

const pendingAccounts = accounts.filter((account) => account.status === AccountStatusType.pending);

const renderPendingAccounts = () => {
return (
<div className="my-8 divide-y divide-gray-500">
Expand Down

0 comments on commit c926907

Please sign in to comment.