Skip to content

Commit

Permalink
fix: ui copy
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideSilva committed Jun 26, 2024
1 parent 91055e3 commit 665f256
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
7 changes: 1 addition & 6 deletions packages/web-app/app/_ui/project/contribution/DataFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ export const DataFields = () => {
<span>{usdValue(currentTokenPrice)} </span>
<span className="text-mono-800">{`($${currentTokenPrice * 100}m)`}</span>
</div>
<span className="text-sm text-mono-800">Price range (FDV range):</span>
<div className="text-sm md:text-end">
<span>$0.2</span>
<span className="text-mono-800">($20m)</span>
</div>
</div>
<div className="grid grid-cols-1 gap-x-2 gap-y-1 md:grid-cols-2">
<span className="text-mono-800">Tokens distributed:</span>
Expand All @@ -62,7 +57,7 @@ export const DataFields = () => {
</div>
<span className="text-sm text-mono-800">(% of total supply):</span>
<div className="text-sm md:text-end">
<span className="text-mono-800">(0.25% - 1.25)</span>
<span className="text-mono-800">(0.25% - 1.25%)</span>
</div>
</div>
<div className="flex flex-col gap-2 md:flex-row md:justify-between">
Expand Down
8 changes: 0 additions & 8 deletions packages/web-app/app/_ui/projects/project-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { BannerImage } from './banner-image';
import { Status } from './status';
import { usdValue } from '../utils/intl-formaters/usd-value';
import { usdRange } from '../utils/intl-formaters/usd-range';
import { shortDateRange } from '../utils/intl-formaters/date-range';
import { formatUnits } from 'viem/utils';
import {
useCtzndMinContributionUsdc,
Expand All @@ -20,15 +19,12 @@ import { calculateTokenPrice } from '../utils/calculateTokenPrice';
const Upcoming = ({
minTarget,
maxTarget,
startRegistration,
endRegistration,
start,
}: TProjectSaleDetails) => {
const targetedRaise = usdRange(
BigInt(formatUnits(minTarget, 6)),
BigInt(formatUnits(maxTarget, 6)),
);
const registerPeriod = shortDateRange(startRegistration, endRegistration);
const { days, hours, minutes, seconds } = useCountdown(start);

return (
Expand All @@ -37,10 +33,6 @@ const Upcoming = ({
<span className="text-mono-400">Targeted Raise</span>
<span>{targetedRaise}</span>
</li>
<li className="flex flex-col justify-between gap-3 md:flex-row">
<span className="text-mono-400">Register period</span>
<span>{registerPeriod}</span>
</li>
<li className="-mx-6 -mb-4 flex flex-row items-center gap-3 border-t border-t-mono-400 px-6 pt-4 md:-mx-8 md:px-8">
<div className="flex flex-col gap-3 md:flex-row">
<span className="text-mono-400">Sale starts in:</span>
Expand Down
11 changes: 10 additions & 1 deletion packages/web-app/app/api/sale/route.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { saleDetails } from '@/app/_server/sales';
import { formatUnits } from 'viem';

declare global {
interface BigInt {
Expand All @@ -21,5 +22,13 @@ export async function GET(_request: Request) {
});
}

return Response.json(details);
const tempDetails = details.map((project) => {
return {
...project,
minTarget: formatUnits(project.minTarget, 6),
maxTarget: formatUnits(project.maxTarget, 6),
}
});

return Response.json(tempDetails);
}

0 comments on commit 665f256

Please sign in to comment.