Skip to content

Commit

Permalink
update date
Browse files Browse the repository at this point in the history
  • Loading branch information
saramontagud committed Aug 28, 2024
1 parent 6fd9f8a commit 949c083
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 32 deletions.
62 changes: 34 additions & 28 deletions app/components/Ticket.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

/* eslint-disable @next/next/no-img-element */
import 'atropos/css';
import { Atropos } from 'atropos/react';
import { forwardRef } from 'react'
import "atropos/css";
import { Atropos } from "atropos/react";
import { forwardRef } from "react";

interface TicketProps {
avatar?: string;
Expand All @@ -12,28 +11,26 @@ interface TicketProps {

export const sponsors = [
{
name: 'Afordin',
logo: '/imgs/ticket/sponsor_1.webp'
}
name: "Afordin",
logo: "/imgs/ticket/sponsor_1.webp",
},
];
export const Ticket = forwardRef<HTMLDivElement, TicketProps>(function Ticket({
name = 'tpicj aforcita',
number = 1,
avatar = '/imgs/ticket/avatar.png',
}, ref) {


export const Ticket = forwardRef<HTMLDivElement, TicketProps>(function Ticket(
{ name = "tpicj aforcita", number = 1, avatar = "/imgs/ticket/avatar.png" },
ref
) {
return (
<div className="flex justify-center md:w-full mx-auto mt-5 p-2 md:p-0">
<Atropos
shadowScale={1.1}
innerClassName="rounded-2xl"
className="w-[60%] lg:w-full h-[30%] max-h-[210px] max-w-[700px] bg-transparent mx-auto rounded-2xl shadow-[0_0px_90px_-10px_#c138b830] hover:shadow-none"
>
<div className="ticket-bg w-full flex h-full rounded-2xl border-2 border-[#171717]" ref={ref}>
<div
className="flex flex-col col-span-6 justify-between p-4 sm:p-[30px] sm:pb-[17px] w-full rounded-2xl bg-cBlack rounded-tr-0 rounded-rb-0"
>
<div
className="ticket-bg w-full flex h-full rounded-2xl border-2 border-[#171717]"
ref={ref}
>
<div className="flex flex-col col-span-6 justify-between p-4 sm:p-[30px] sm:pb-[17px] w-full rounded-2xl bg-cBlack rounded-tr-0 rounded-rb-0">
<div className="flex gap-5 items-center">
<img
data-atropos-offset="2"
Expand All @@ -46,20 +43,27 @@ export const Ticket = forwardRef<HTMLDivElement, TicketProps>(function Ticket({
<h3
title={name}
data-atropos-offset="3"
className={`flex font-bold text-lg sm:text-3xl md:${name.length > 15 ? 'text-2xl' : 'text-4xl'}`}
className={`flex font-bold text-lg sm:text-3xl md:${
name.length > 15 ? "text-2xl" : "text-4xl"
}`}
>
{name}
</h3>
<span data-atropos-offset="4" className={`flex gap-1 items-center`}>
<span
data-atropos-offset="4"
className={`flex gap-1 items-center`}
>
<span className="i-bi-twitch text-xl" />
<p className="font-bold text-[0.7rem] md:text-lg">twitch.tv/afor_digital</p>
<p className="font-bold text-[0.7rem] md:text-lg">
twitch.tv/afor_digital
</p>
</span>
</div>
</div>
<div className="flex justify-between items-end" >
<div className="flex justify-between items-end">
<div data-atropos-offset="3" className="flex items-end gap-4">
<p className="flex flex-col items-center text-xs sm:text-[28px] leading-tight">
<span className="font-100">NOV</span>
<span className="font-100">SEPT</span>
<span className="font-bold">20</span>
</p>
<div>
Expand All @@ -75,8 +79,11 @@ export const Ticket = forwardRef<HTMLDivElement, TicketProps>(function Ticket({
</div>
</div>
</div>
<p data-atropos-offset="8" className="text-xs sm:text-[28px] leading-none">
#{number.toString().padStart(5, '0')}
<p
data-atropos-offset="8"
className="text-xs sm:text-[28px] leading-none"
>
#{number.toString().padStart(5, "0")}
</p>
</div>
</div>
Expand All @@ -92,6 +99,5 @@ export const Ticket = forwardRef<HTMLDivElement, TicketProps>(function Ticket({
</div>
</Atropos>
</div>
)
}
)
);
});
2 changes: 1 addition & 1 deletion app/components/WelcomeHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const WelcomeHero: FC<Props> = ({ variant, children }) => {
</div>

{/* Wrapper was moved to countdown because its component logic, could be override by className prop */}
<Countdown startFrom={new Date("2024-09-15")} />
<Countdown startFrom={new Date("2024-09-20")} />

<div className="flex gap-6 pb-12">
{variant === "home" && (
Expand Down
3 changes: 0 additions & 3 deletions app/components/common/Countdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ export const Countdown = ({ className, startFrom }: CountDownProps) => {
return number < 10 ? `0${number}` : number;
};

/* gap-16 = 64px */
/* Use cn to override the wraper if need it */

return (
<div className={cn("mt-10 flex gap-6 md:gap-16", className)}>
{time.map(({ key, label }, index) => (
Expand Down

0 comments on commit 949c083

Please sign in to comment.