Skip to content

Commit 57d7578

Browse files
authored
chore: update text (#2717)
1 parent a221fd1 commit 57d7578

File tree

6 files changed

+59
-36
lines changed

6 files changed

+59
-36
lines changed

src/components/incentives/MeritIncentivesTooltipContent.tsx

Lines changed: 50 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
MeritIncentivesBreakdown,
88
} from 'src/hooks/useMeritIncentives';
99
import { useModalContext } from 'src/hooks/useModal';
10+
import { useRootStore } from 'src/store/root';
1011

1112
import { FormattedNumber } from '../primitives/FormattedNumber';
1213
import { Link, ROUTES } from '../primitives/Link';
@@ -112,6 +113,7 @@ export const MeritIncentivesTooltipContent = ({
112113
}) => {
113114
const theme = useTheme();
114115
const { openClaimRewards } = useModalContext();
116+
const account = useRootStore((store) => store.account);
115117
const typographyVariant = 'secondary12';
116118

117119
const handleClaimClick = () => {
@@ -231,22 +233,30 @@ export const MeritIncentivesTooltipContent = ({
231233
{campaignConfig.type === CampaignType.SELF_VERIFICATION && selfConfig ? (
232234
<>
233235
<Trans>Merit Program and Self rewards can be claimed </Trans>
234-
<Typography
235-
component="span"
236-
onClick={handleClaimClick}
237-
sx={{
238-
textDecoration: 'underline',
239-
cursor: 'pointer',
240-
fontSize: '13px !important',
241-
fontWeight: 'bold',
242-
mx: 0.5,
243-
}}
244-
variant="caption"
245-
color="primary"
246-
>
247-
<Trans>here</Trans>
248-
</Typography>
249-
<Trans> or from the </Trans>
236+
{account ? (
237+
<>
238+
<Typography
239+
component="span"
240+
onClick={handleClaimClick}
241+
sx={{
242+
textDecoration: 'underline',
243+
cursor: 'pointer',
244+
fontSize: '13px !important',
245+
fontWeight: 'bold',
246+
mx: 0.5,
247+
}}
248+
variant="caption"
249+
color="primary"
250+
>
251+
<Trans>here</Trans>
252+
</Typography>
253+
<Trans> or from the </Trans>
254+
</>
255+
) : (
256+
<span style={{ marginLeft: '4px' }}>
257+
<Trans>from the </Trans>
258+
</span>
259+
)}
250260
<Link
251261
href={`${ROUTES.dashboard}`}
252262
sx={{
@@ -265,22 +275,30 @@ export const MeritIncentivesTooltipContent = ({
265275
) : (
266276
<>
267277
<Trans>Merit Program rewards can be claimed </Trans>
268-
<Typography
269-
component="span"
270-
onClick={handleClaimClick}
271-
sx={{
272-
textDecoration: 'underline',
273-
cursor: 'pointer',
274-
fontSize: '13px !important',
275-
fontWeight: 'bold',
276-
mx: 0.5,
277-
}}
278-
variant="caption"
279-
color="primary"
280-
>
281-
<Trans>here</Trans>
282-
</Typography>
283-
<Trans> or from the </Trans>
278+
{account ? (
279+
<>
280+
<Typography
281+
component="span"
282+
onClick={handleClaimClick}
283+
sx={{
284+
textDecoration: 'underline',
285+
cursor: 'pointer',
286+
fontSize: '13px !important',
287+
fontWeight: 'bold',
288+
mx: 0.5,
289+
}}
290+
variant="caption"
291+
color="primary"
292+
>
293+
<Trans>here</Trans>
294+
</Typography>
295+
<Trans> or from the </Trans>
296+
</>
297+
) : (
298+
<span style={{ marginLeft: '4px' }}>
299+
<Trans>from the </Trans>
300+
</span>
301+
)}
284302
<Link
285303
href={`${ROUTES.dashboard}`}
286304
sx={{

src/locales/el/messages.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/locales/en/messages.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/locales/en/messages.po

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2276,6 +2276,11 @@ msgstr "Array parameters that should be equal length are not"
22762276
msgid "Your balance is lower than the selected amount."
22772277
msgstr "Your balance is lower than the selected amount."
22782278

2279+
#: src/components/incentives/MeritIncentivesTooltipContent.tsx
2280+
#: src/components/incentives/MeritIncentivesTooltipContent.tsx
2281+
msgid "from the"
2282+
msgstr "from the"
2283+
22792284
#: src/modules/governance/proposal/ProposalOverview.tsx
22802285
msgid "An error has occurred fetching the proposal."
22812286
msgstr "An error has occurred fetching the proposal."

src/locales/es/messages.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/locales/fr/messages.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)