Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update accruing rewards text and add subtext #1207

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/rewards-dashboard/src/layouts/DashboardLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ const ConnectedDashboard = () => {
value={formatInteger(accruedRewards, 6)}
unit="USDS"
infoElement={<Trans>Accrued Rewards Tooltip</Trans>}
subtext={t`Rewards will be distributed directly to your wallet on a weekly basis.`}
/>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/rewards-dashboard/src/locales/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ msgstr ""

#: src/layouts/DashboardLayout.tsx:223
msgid "Accrued Rewards Header"
msgstr "Accruing USDS Rewards"
msgstr "Weekly Accruing Rewards"

#: src/layouts/DashboardLayout.tsx:226
msgid "Accrued Rewards Tooltip"
Expand Down
15 changes: 13 additions & 2 deletions apps/rewards-dashboard/src/quarks/StatWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ interface InfoStatWindowProps {
value?: string;
unit?: string;
infoElement?: JSX.Element;
subtext?: string;
}
export const InfoStatWindow = (props: InfoStatWindowProps) => {
const { unit, value, header, infoElement } = props;
const { unit, value, header, infoElement, subtext } = props;
return (
<div
className={`
Expand All @@ -91,11 +92,12 @@ export const InfoStatWindow = (props: InfoStatWindowProps) => {
className="flex flex-col pr-8 w-full
"
>
<div className="flex flex-row justify-between">
<div className="flex flex-row justify-start items-center">
<h4 className="text-white text-start whitespace-pre text-sm">
{header}
</h4>
</div>

<div className="flex flex-row items-end">
{value ? (
<div className="text-white whitespace-pre text-start font-bold text-2xl">
Expand All @@ -119,6 +121,15 @@ export const InfoStatWindow = (props: InfoStatWindowProps) => {
""
)}
</div>
<p
className={`${
subtext === undefined
? "hidden"
: "text-xs text-start text-white text-opacity-50"
} `}
>
{subtext}
</p>
</div>
<InfoHover>
<div className="prose text-[10px] text-white">
Expand Down