Skip to content

Commit 5d3e868

Browse files
committed
use new shadcn button
1 parent b3f7b5d commit 5d3e868

File tree

1 file changed

+34
-29
lines changed

1 file changed

+34
-29
lines changed

src/components/Translatathon/StepByStepInstructions.tsx

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { ButtonLink } from "@/components/Buttons"
2-
31
import { CROWDIN_PROJECT_URL } from "@/lib/constants"
42

3+
import { Button, ButtonLink } from "../ui/buttons/Button"
54
import { Center, Flex } from "../ui/flex"
65

76
import {
@@ -71,35 +70,41 @@ export const StepByStepInstructions = () => {
7170

7271
return (
7372
<Flex className="w-full flex-col">
74-
{instructions.map((instruction, index) => (
75-
<Flex
76-
key={index}
77-
className="w-full flex-col items-start justify-between gap-4 border-b border-body-light p-4 md:flex-row md:items-center"
78-
>
79-
<Flex className="flec-col align-left md:align-center gap-4 md:flex-row">
80-
<Center className="bg-background-base h-[46px] min-w-[46px] max-w-[46px] rounded-lg p-1 shadow-[2px_6px_18px_rgba(0,0,0,0.1)]">
81-
<p className="text-4xl font-bold text-primary">{index + 1}</p>
82-
</Center>
83-
<Flex className="flex-col">
84-
<p className="text-xl font-bold">{instruction.title}</p>
85-
<p>{instruction.description}</p>
73+
{instructions.map((instruction, index) => {
74+
const isDisabled = instruction.ctaLink === APPLICATION_URL && !appLive
75+
76+
return (
77+
<Flex
78+
key={index}
79+
className="w-full flex-col items-start justify-between gap-4 border-b border-body-light p-4 md:flex-row md:items-center"
80+
>
81+
<Flex className="flex-col items-start gap-4 md:flex-row md:items-center">
82+
<Center className="h-[46px] min-w-[46px] max-w-[46px] rounded-lg bg-background p-1 shadow">
83+
<p className="text-4xl font-bold text-primary">{index + 1}</p>
84+
</Center>
85+
<Flex className="flex-col">
86+
<p className="text-xl font-bold">{instruction.title}</p>
87+
<p>{instruction.description}</p>
88+
</Flex>
8689
</Flex>
90+
{instruction.ctaLink ? (
91+
<Flex className="h-[42px]">
92+
{isDisabled ? (
93+
<Button variant="outline" disabled>
94+
{instruction.ctaLabel}
95+
</Button>
96+
) : (
97+
<ButtonLink href={instruction.ctaLink} variant="outline">
98+
{instruction.ctaLabel}
99+
</ButtonLink>
100+
)}
101+
</Flex>
102+
) : (
103+
<Flex className="w-[140px]" />
104+
)}
87105
</Flex>
88-
{instruction.ctaLink ? (
89-
<Flex className="h-[42px]">
90-
<ButtonLink
91-
href={instruction.ctaLink}
92-
variant="outline"
93-
isDisabled={instruction.ctaLink === APPLICATION_URL && !appLive}
94-
>
95-
{instruction.ctaLabel}
96-
</ButtonLink>
97-
</Flex>
98-
) : (
99-
<Flex className="w-[140px]" />
100-
)}
101-
</Flex>
102-
))}
106+
)
107+
})}
103108
</Flex>
104109
)
105110
}

0 commit comments

Comments
 (0)