Skip to content

Commit 72e4aaa

Browse files
committed
formatting
1 parent 15ae5f7 commit 72e4aaa

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

src/components/v2v3/V2V3Project/ProjectDashboard/components/ProjectHeaderCountdown.tsx

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { ReactNode, useMemo } from 'react'
22
import { twMerge } from 'tailwind-merge'
33
import { useFundingCycleCountdown } from '../hooks/useFundingCycleCountdown'
4+
import { useProjectMetadata } from '../hooks/useProjectMetadata'
45

56
const RS_PROJECT_ID = 618
67

@@ -11,6 +12,7 @@ export type ProjectHeaderCountdownProps = {
1112
export const ProjectHeaderCountdown: React.FC<ProjectHeaderCountdownProps> = ({
1213
className,
1314
}) => {
15+
const { projectId } = useProjectMetadata()
1416
const { secondsRemaining } = useFundingCycleCountdown()
1517

1618
const { days, hours, minutes, seconds } = useMemo(() => {
@@ -21,22 +23,23 @@ export const ProjectHeaderCountdown: React.FC<ProjectHeaderCountdownProps> = ({
2123
return { days, hours, minutes, seconds }
2224
}, [secondsRemaining])
2325

24-
if (RS_PROJECT_ID === 618) return null
26+
if (projectId !== RS_PROJECT_ID) return null
2527

2628
if (secondsRemaining === 0) return null
29+
2730
return (
2831
<div
2932
className={twMerge(
30-
'absolute bottom-5 left-1/2 mx-auto flex w-full max-w-6xl -translate-x-1/2 items-center justify-end pr-5',
33+
'absolute bottom-5 left-1/2 mx-auto flex w-full max-w-6xl -translate-x-1/2 items-center justify-end pr-4 md:pr-5 xl:pr-0',
3134
className,
3235
)}
3336
>
3437
<div className="mr-3 text-lg text-white">Closing in</div>
35-
<div className="flex gap-1.5">
36-
<CountdownCard label="Days" unit={days} />
37-
<CountdownCard label="Hrs" unit={hours} />
38-
<CountdownCard label="Mins" unit={minutes} />
39-
<CountdownCard label="Secs" unit={seconds} />
38+
<div className="flex gap-3">
39+
<CountdownCard label="DAYS" unit={days} />
40+
<CountdownCard label="HRS" unit={hours} />
41+
<CountdownCard label="MINS" unit={minutes} />
42+
<CountdownCard label="SECS" unit={seconds} />
4043
</div>
4144
</div>
4245
)
@@ -51,6 +54,8 @@ export const CountdownCard = ({
5154
}) => (
5255
<div className="flex w-11 flex-1 flex-col items-center rounded-lg border border-smoke-75 bg-smoke-50 py-1 px-1.5 text-black drop-shadow dark:border-slate-400 dark:bg-slate-700 dark:text-white">
5356
<div className="text-xl">{unit}</div>
54-
<div className="text-xs">{label}</div>
57+
<div className="text-xs font-medium text-grey-500 dark:text-slate-200">
58+
{label}
59+
</div>
5560
</div>
5661
)

0 commit comments

Comments
 (0)