Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main #98

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

Main #98

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
Binary file added public/final.mp4
Binary file not shown.
Binary file added public/speakers/pouria.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 5 additions & 19 deletions src/app/components/CountDown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import WaveMobile from "@/assets/images/home/count-down-wave-mobile.svg";
import Wave from "@/assets/images/home/count-down-wave.svg";
import { conferenceDateTime } from "@/data/timing";
import { calculateTimeRemaining } from "@/utils/countDown";
import Image from "next/image";
import React, { Fragment, useState } from "react";
import { HiOutlineClock } from "react-icons/hi";
Expand Down Expand Up @@ -35,28 +36,13 @@ export default function CountDown() {
}

const CountDownTimer = () => {
const calculateTimeRemaining = () => {
const now = new Date().getTime();
const target = conferenceDateTime.getTime();
const timeRemaining = target - now;

const days = Math.floor(timeRemaining / (1000 * 60 * 60 * 24));
const hours = Math.floor(
(timeRemaining % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60),
);
const minutes = Math.floor(
(timeRemaining % (1000 * 60 * 60)) / (1000 * 60),
);
const seconds = Math.floor((timeRemaining % (1000 * 60)) / 1000);

return { days, hours, minutes, seconds };
};

const [timeRemaining, setTimeRemaining] = useState(calculateTimeRemaining());
const [timeRemaining, setTimeRemaining] = useState(
calculateTimeRemaining(conferenceDateTime),
);

React.useEffect(() => {
const interval = setInterval(() => {
setTimeRemaining(calculateTimeRemaining());
setTimeRemaining(calculateTimeRemaining(conferenceDateTime));
}, 1000);

return () => clearInterval(interval);
Expand Down
6 changes: 3 additions & 3 deletions src/app/components/Participants/Participants.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { RiCouponLine } from "react-icons/ri";

import Image from "next/image";
import waveDesktop from "@/assets/images/home/participants-wave-desktop.png";
import waveMobile from "@/assets/images/home/participants-wave-mobile.png";
import Image from "next/image";
import getParticipantList, { Participant } from "./getParticipantList";

const Participants = async () => {
Expand Down Expand Up @@ -35,12 +35,12 @@ const Participants = async () => {
<RiCouponLine className="size-16 text-orange-500" />
<div className="flex flex-col items-center gap-2 md:gap-4">
<h2 className="text-center text-3xl font-bold ">شرکت کنندگان</h2>
<div className="flex items-center gap-2 text-xl text-zinc-400 md:text-2xl">
{/* <div className="flex items-center gap-2 text-xl text-zinc-400 md:text-2xl">
<strong className="text-orange-500">
{participantList.length.toLocaleString("fa-IR")}
</strong>{" "}
<span>شرکت کننده تا این لحظه</span>
</div>
</div> */}
<div className="flex items-center gap-2 rounded bg-zinc-800 p-3 text-zinc-300">
<i className="size-3 rounded-full bg-green-600"></i>
<span className="text-sm font-bold">اطلاعات زنده</span>
Expand Down
8 changes: 4 additions & 4 deletions src/app/components/Timeline/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ export const confDayTimeline: TimelineItemType[] = [
link: "https://linkedin.com/in/amir-kabiri/",
},
{
profile: "/speakers/zahra-khanjani.jpeg",
speaker: "زهرا خانجانی",
title: "از کد بد به کد خوب",
profile: "/speakers/pouria.jpg",
speaker: "پوریا باباعلی",
title: "بدهی فنی",
start: "۱۱:۴۰",
end: "۱۲:۰۰",
type: "speaker",
link: "https://linkedin.com/in/zahra-khanjani/",
link: "https://www.linkedin.com/in/pouriya-babaali/",
},
{
profile: "/speakers/hossein-mousavi.jpeg",
Expand Down
Binary file modified src/assets/images/home/speakers-avatar-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions src/data/speakersData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ export const speakersData: TSpeakerCard[] = [
},
{
avatar: imageAvatarFive,
fullName: "زهرا خانجانی",
position: "برنامه‌نویس فرانت‌اند",
company: "چپتر لید آیتول",
fullName: "پوریا باباعلی",
position: "مهندس نرم‌افزار",
company: "مدرس در کوئرا",
socials: {
linkedin: "https://linkedin.com/in/zahra-khanjani",
linkedin: "https://www.linkedin.com/in/pouriya-babaali/",
},
},
{
Expand Down
4 changes: 4 additions & 0 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
html {
scroll-behavior: smooth;
}
body {
max-width: 100vw;
overflow-x: hidden;
}
15 changes: 15 additions & 0 deletions src/utils/countDown.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"use client";

export const calculateTimeRemaining = (conferenceDateTime: Date) => {
const now = new Date().getTime();
const timeLeft = conferenceDateTime.getTime() - now;

const days = Math.floor(timeLeft / (1000 * 60 * 60 * 24));
const hours = Math.floor(
(timeLeft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60),
);
const minutes = Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((timeLeft % (1000 * 60)) / 1000);

return { days, hours, minutes, seconds };
};
Loading