Closed abhishek-01k closed 1 week ago
In the file src/modules/rewards/components/ActivityButton.tsx:
import { ActivityType } from 'queries';
instead of import { ActvityType } from 'queries';
.case 'follow_push_on_twitter':
componentToRender = (
<TwitterActivityButton
userId={userId}
activityTypeId={activityTypeId}
refetchActivity={refetchActivity}
setErrorMessage={setErrorMessage}
/>
);
break;
default:
componentToRender = (
<DefaultActivityButton />
);
break;
}
after the switch statement to properly close the component declaration.Corrected Code:
import { FC } from 'react';
import DiscordActivityButton from './DiscordActivityButton';
import TwitterActivityButton from './TwitterActivityButton';
import DefaultActivityButton from './DefaultActivityButton';
import { ActivityType } from 'queries';
type ActivityButtonProps = {
userId: string;
activityTypeId: string;
activityType: ActivityType;
refetchActivity: () => void;
setErrorMessage: (errorMessage: string) => void;
};
const ActivityButton: FC<ActivityButtonProps> = ({
userId,
activityTypeId,
refetchActivity,
activityType,
setErrorMessage
}) => {
let componentToRender;
switch (activityType) {
case 'follow_push_on_discord':
componentToRender = (
<DiscordActivityButton
userId={userId}
activityTypeId={activityTypeId}
refetchActivity={refetchActivity}
setErrorMessage={setErrorMessage}
/>
);
break;
case 'follow_push_on_twitter':
componentToRender = (
<TwitterActivityButton
userId={userId}
activityTypeId={activityTypeId}
refetchActivity={refetchActivity}
setErrorMessage={setErrorMessage}
/>
);
break;
default:
componentToRender = (
<DefaultActivityButton />
);
break;
}
return <div>{componentToRender}</div>;
};
export default ActivityButton;
All looks good.
In Rewards.tsx:
Line 31, missing comma after 'gap="s6"'.
Line 32 and 38, incorrect placement of style properties inside Text component.
Line 34, missing closing tag for Text component.
Line 36, missing opening tag for Text component.
Line 42, missing closing curly brace after 'ReferralSection />'.
Line 52, missing closing curly brace for the component.
Line 54, missing closing parentheses for the function.
In ActivityButton.tsx:
In DiscordActivityButton.tsx:
In RewardsActivitiesList.tsx:
In RewardsTabsContainer.tsx:
In TwitterActivityButton.tsx:
These are the issues found in the specified files.
In the Rewards.tsx file:
useEffect
hook is missing. It should be added before the next conditional block.if (!isWalletConnected)
block. It should be added before the next conditional block.if (!caip10WalletAddress || !userPushSDKInstance || !userError || !isWalletConnected)
block. It should be added before the next conditional block.In the ActivityButton.tsx file:
<DefaultActivityButton />
component is missing the closing angle bracket >
. It should be corrected to <DefaultActivityButton />;
.ActivityButton
component is missing the closing curly brace }
. It should be added at the end of the component definition.In the DefaultActivityButton.tsx file:
}
is missing for the DefaultActivityButton
component. It should be added at the end of the component definition.In the DiscordActivityButton.tsx file:
return
statement inside the handleVerify
function is missing a closing curly brace }
. It should be added before the return
statement.return
statement inside the DiscordActivityButton
component is missing a closing curly brace }
. It should be added at the end of the component.All other files seem to be fine.
All looks good.
In Rewards.tsx
:
useEffect
hook, the closing curly braces are missing for the conditionals. Add closing braces after the return
statements.RewardsTabsContainer
component is missing the closing tag />
.In DefaultActivityButton.tsx
:
DefaultActivityButton
component, the closing brace at the end is missing. Add }
before exporting.In RewardsActivityIcon.tsx
:
RewardsActivityIcon
component, there is a missing closing brace for the if (type === 'follow_push_on_twitter')
block. Add a closing brace before the return <RewardsActivity />;
.It seems the code snippets provided are not complete, but these are the issues that stand out based on the sections shown.
All looks good.
Pull Request Template
Ticket Number
Not any particular but it needs to be merged in the rewardsV1 branch for twitter flow
Description
Type of Change
Checklist
Frontend Guidelines
Build & Testing
Screenshots/Video with Explanation
Before: Explain the previous behavior
After: What's changed now
Additional Context
Review & Approvals
Notes
We need to change the config to the Push's One right now it has my personal config for testing purpose only.