Skip to content

Commit

Permalink
Merge pull request #14066 from Sambit03/migrate-Translatathon/Transla…
Browse files Browse the repository at this point in the history
…tathonCalendar

Migrate  Translatathon/TranslatathonCalendar.tsx to Shadcn/Tailwind
  • Loading branch information
pettinarip authored Oct 28, 2024
2 parents 9a336dd + 329ed4f commit 03f6e3c
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions src/components/Translatathon/TranslatathonCalendar.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import { useRouter } from "next/router"
import { FaDiscord } from "react-icons/fa"
import { Heading, Icon, Text } from "@chakra-ui/react"

import type { Lang } from "@/lib/types"

import { ButtonLink } from "@/components/Buttons"
import InlineLink from "@/components/Link"
import { ButtonLink } from "@/components/ui/buttons/Button"
import { Flex } from "@/components/ui/flex"
import InlineLink from "@/components/ui/Link"

import { cn } from "@/lib/utils/cn"
import { trackCustomEvent } from "@/lib/utils/matomo"
import { getLocaleTimestamp } from "@/lib/utils/time"

import { Flex } from "../ui/flex"

const matomoEvent = (buttonType: string) => {
trackCustomEvent({
eventCategory: "TranslatathonCalender",
Expand Down Expand Up @@ -65,31 +63,23 @@ export const TranslatathonCalendar = () => {
"bg-gradient-to-r from-accent-a/10 to-accent-c/10 dark:from-accent-a/20 dark:to-accent-c-hover/20"
)}
>
<Heading as="h3" fontSize="2xl">
Translatathon calls
</Heading>
<Text>
<h3 className="text-2xl font-bold">Translatathon calls</h3>
<p>
Join us on the ethereum.org Discord for a series of onboarding calls
and workshops where we’ll cover everything you need to know about the
Translatathon, walk through using Crowdin and answer any questions you
might have.
</Text>
<ButtonLink
href="/discord/"
gap={2}
onClick={() => matomoEvent("discord")}
>
<Icon as={FaDiscord} fontSize={25} />
</p>
<ButtonLink href="/discord/" onClick={() => matomoEvent("discord")}>
<FaDiscord className="text-2xl" />
Join Discord
</ButtonLink>
</Flex>
<Flex className="w-full flex-col bg-background-highlight p-8 lg:w-1/2">
<Text fontSize="lg" fontWeight="bold" mb={2}>
Translatathon calls
</Text>
<p className="mb-2 text-lg font-bold">Translatathon calls</p>
{events.map((event, index) => (
<Flex className="mb-4 gap-6" key={index}>
<Text>{getLocaleTimestamp(locale! as Lang, event.date)}</Text>
<p>{getLocaleTimestamp(locale! as Lang, event.date)}</p>
<InlineLink href={event.calendarLink}>{event.title}</InlineLink>
</Flex>
))}
Expand Down

0 comments on commit 03f6e3c

Please sign in to comment.