From c1d050d9647403ed1a2511d09d9abfba6e21cede Mon Sep 17 00:00:00 2001 From: Rohitkk432 <74586376+Rohitkk432@users.noreply.github.com> Date: Sat, 29 Jul 2023 15:11:43 +0530 Subject: [PATCH] minor ui changes --- src/components/issues/open-issues-expand.tsx | 36 +++++++++----------- src/components/swaps/BuyConsole.tsx | 2 +- src/components/swaps/SwapConsole.tsx | 2 +- src/pages/onboarding.tsx | 6 ++-- 4 files changed, 21 insertions(+), 25 deletions(-) diff --git a/src/components/issues/open-issues-expand.tsx b/src/components/issues/open-issues-expand.tsx index a100d51..4bbfc65 100644 --- a/src/components/issues/open-issues-expand.tsx +++ b/src/components/issues/open-issues-expand.tsx @@ -131,9 +131,9 @@ const OpenIssueExpand: React.FC = ({ const [selectedPR, setSelectedPR] = useState(); const userInfo = useAppSelector((state) => state.userInfo.githubInfo); - const [userTokenInfo, setUserTokenInfo] = useState(null); + const [userTokenInfo, setUserTokenInfo] = useState(); - const refetchPart = useAppSelector((state)=> state.refetch.refetchPart); + const refetchPart = useAppSelector((state) => state.refetch.refetchPart); const [PRSort, setPRSort] = useState([ { @@ -762,8 +762,10 @@ const OpenIssueExpand: React.FC = ({ }, [link]); useEffect(() => { - if(refetchPart==='issue'){ - setTokenStakingState(); + if (refetchPart === 'issue') { + setTimeout(() => { + setTokenStakingState(); + }, 1000); setStakeAmount(0); setPRStakeAmount(0); } @@ -822,12 +824,7 @@ const OpenIssueExpand: React.FC = ({ shape="rounded" onClick={handleIssueStake} isLoading={stateLoading === 'loading'} - disabled={ - userTokenInfo === null || - parseInt(userTokenInfo.amount) / - 10 ** userTokenInfo.decimals === - 0 - } + disabled={userTokenInfo === null} > Stake @@ -845,10 +842,12 @@ const OpenIssueExpand: React.FC = ({
{userTokenInfo === null ? "User doesn't have tokens." - : userTokenInfo.amount && userTokenInfo.decimals + : userTokenInfo !== undefined && + userTokenInfo.amount && + userTokenInfo.decimals ? `Balance: ${ - parseInt(userTokenInfo.amount) / - 10 ** userTokenInfo.decimals + parseInt(userTokenInfo?.amount) / + 10 ** userTokenInfo?.decimals }` : null}
@@ -898,12 +897,7 @@ const OpenIssueExpand: React.FC = ({ shape="rounded" onClick={handlePRStake} isLoading={stateLoading === 'loading'} - disabled={ - userTokenInfo === null || - parseInt(userTokenInfo.amount) / - 10 ** userTokenInfo.decimals === - 0 - } + disabled={userTokenInfo === null} > Stake @@ -921,7 +915,9 @@ const OpenIssueExpand: React.FC = ({
{userTokenInfo === null ? "User doesn't have tokens." - : userTokenInfo.amount && userTokenInfo.decimals + : userTokenInfo !== undefined && + userTokenInfo?.amount && + userTokenInfo?.decimals ? `Balance: ${ parseInt(userTokenInfo.amount) / 10 ** userTokenInfo.decimals diff --git a/src/components/swaps/BuyConsole.tsx b/src/components/swaps/BuyConsole.tsx index fc3a692..ff5408b 100644 --- a/src/components/swaps/BuyConsole.tsx +++ b/src/components/swaps/BuyConsole.tsx @@ -252,7 +252,7 @@ const BuyConsole: React.FC = ({ setConsoleType }) => { Announcement
- Between 24th July and 31st July the following devnet tokens + Between 24th July and 4th August the following devnet tokens
= ({ setConsoleType }) => { Announcement
- Between 24th July and 31st July the following devnet tokens + Between 24th July and 4th August the following devnet tokens
= ({}) => { Contributor
- Best if you are working on existing open source projects or + if you are working on existing open source projects or staking money on open issues.
@@ -130,7 +130,7 @@ const Onboarding: React.FC = ({}) => { Repo Owner
- Best for people who own and operate multiple open source + For people who own and operate multiple open source repositories and want a management console.
@@ -141,7 +141,7 @@ const Onboarding: React.FC = ({}) => { setUserRole('unchoosen'); handleSumbitType(); }} - className="absolute top-5 right-5 text-sm text-gray-400 xl:text-base 3xl:text-lg" + className="absolute top-5 right-5 cursor-pointer text-sm text-gray-400 xl:text-base 3xl:text-lg" > Skip