Skip to content

Commit

Permalink
Merge pull request #57 from ms-club-sliit/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Randula98 authored Aug 15, 2024
2 parents 50b992a + 46d9374 commit d0ea30e
Show file tree
Hide file tree
Showing 11 changed files with 105 additions and 49 deletions.
11 changes: 9 additions & 2 deletions app/_components/Home/Eligibility/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// TODO: Create a Eligibility component.
export default function Eligibility() {
const url = "https://teams.microsoft.com/l/message/19:[email protected]/1723704794568?context=%7B%22contextType%22%3A%22chat%22%7D";
return (
<main
id="eligibility"
Expand All @@ -23,6 +23,13 @@ export default function Eligibility() {
All 3rd Year 1st Semester Students
</div>
</div>
<div className="flex justify-center mt-6">
<a href={url} target="_blank" rel="noopener noreferrer">
<button className="text-xs lg:text-base px-4 py-2 lg:px-8 lg:py-3 text-white bg-blue-500 rounded-lg lg:rounded-xl hover:bg-blue-700 font-bold">
Join our Teams Channel
</button>
</a>
</div>
</main>
);
}
}
29 changes: 17 additions & 12 deletions app/_components/Home/Hero/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
"use client";
import Image from "next/image";
import HackathonImage from "../../../../public/images/AIBot.png";
import { useRouter } from 'next/navigation';

export default function Home() {
const router = useRouter();
return (
<div className="container mx-auto text-justify text-[#161414] px-10 lg:px-0">
<div className="relative w-full h-auto flex flex-row px-10 justify-left items-center lg:justify-center gradient-120 rounded-[20px] lg:rounded-[50px] my-10 lg:my-20 py-10">
Expand All @@ -22,17 +25,19 @@ export default function Home() {
</div>
</div>
<div className="flex flex-col lg:flex-row items-start my-2 gap-3 lg:gap-5">
{/* <a href="/register">
<button className="text-xs lg:text-base px-4 py-2 lg:px-8 lg:py-3 text-white bg-blue-500 rounded-lg lg:rounded-xl hover:bg-blue-700 font-bold">
Register
</button>
</a> */}
<a href="/rules">
<button className="text-xs lg:text-base px-4 py-2 lg:px-8 lg:py-3 flex items-center text-blue-500 bg-white rounded-lg lg:rounded-xl hover:bg-blue-700 hover:text-white font-bold">
Full Instructions
<span className="material-symbols-outlined">chevron_right</span>
</button>
</a>
<button className="text-xs lg:text-base px-4 py-2 lg:px-8 lg:py-3 text-white bg-blue-500 rounded-lg lg:rounded-xl hover:bg-blue-700 font-bold"
onClick={() => {
router.push('/register');
}}>
Register
</button>
<button className="text-xs lg:text-base px-4 py-2 lg:px-8 lg:py-3 flex items-center text-blue-500 bg-white rounded-lg lg:rounded-xl hover:bg-blue-700 hover:text-white font-bold"
onClick={() => {
router.push('/rules');
}}>
Full Instructions
<span className="material-symbols-outlined">chevron_right</span>
</button>
</div>
</div>
<div className="absolute lg:static right-5 bottom-1">
Expand All @@ -43,6 +48,6 @@ export default function Home() {
/>
</div>
</div>
</div>
</div >
);
}
43 changes: 43 additions & 0 deletions app/_components/Register/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,49 @@ const Register = () => {

const onClose = () => {
setTicketData((prev) => ({ ...prev, display: false }));
stepData = {
step1: { teamName: null, link: null },
step2: {
name: null,
email: null,
contact: null,
uniID: null,
academicYear: null,
faculty: null,
img: null,
imgUrl: null,
},
step3: {
name: null,
email: null,
contact: null,
uniID: null,
academicYear: null,
faculty: null,
img: null,
imgUrl: null,
},
step4: {
name: null,
email: null,
contact: null,
uniID: null,
academicYear: null,
faculty: null,
img: null,
imgUrl: null,
},
step5: {
name: null,
email: null,
contact: null,
uniID: null,
academicYear: null,
faculty: null,
img: null,
imgUrl: null,
},
};
router.push('/');
};

Expand Down
4 changes: 2 additions & 2 deletions app/_components/Register/step2/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const Step2 = (props) => {
</Col>
</Row>

<Row gutter={16}>
{/* <Row gutter={16}>
<Col xs={24}>
<Form.Item label="Upload Image">
<Form.Item
Expand All @@ -191,7 +191,7 @@ const Step2 = (props) => {
</Form.Item>
</Form.Item>
</Col>
</Row>
</Row> */}

<Form.Item>
<Space direction="vertical" size="middle" className="w-full">
Expand Down
4 changes: 2 additions & 2 deletions app/_components/Register/step3/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const Step4 = (props) => {
</Col>
</Row>

<Row gutter={16}>
{/* <Row gutter={16}>
<Col xs={24}>
<Form.Item label="Upload Image">
<Form.Item
Expand All @@ -191,7 +191,7 @@ const Step4 = (props) => {
</Form.Item>
</Form.Item>
</Col>
</Row>
</Row> */}

<Form.Item>
<Space direction="vertical" size="middle" className="w-full">
Expand Down
4 changes: 2 additions & 2 deletions app/_components/Register/step4/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ const Step4 = (props) => {
</Col>
</Row>

<Row gutter={16}>
{/* <Row gutter={16}>
<Col xs={24}>
<Form.Item label="Upload Image">
<Form.Item
Expand All @@ -192,7 +192,7 @@ const Step4 = (props) => {
</Form.Item>
</Form.Item>
</Col>
</Row>
</Row> */}

<Form.Item>
<Space direction="vertical" size="middle" className="w-full">
Expand Down
4 changes: 2 additions & 2 deletions app/_components/Register/step5/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ const Step5 = (props) => {
</Col>
</Row>

<Row gutter={16}>
{/* <Row gutter={16}>
<Col xs={24}>
<Form.Item label="Upload Image">
<Form.Item
Expand All @@ -206,7 +206,7 @@ const Step5 = (props) => {
</Form.Item>
</Form.Item>
</Col>
</Row>
</Row> */}

<Form.Item>
<Space direction="vertical" size="middle" className="w-full">
Expand Down
2 changes: 1 addition & 1 deletion app/_components/Register/step6/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const step6 = (props) => {
<main>
<div className="my-20">{contextHolder}</div>
<div className="flex justify-center items-center h-screen">
Processing... &nbsp; <Spin size="large" />
Generating Registration Ticket ... &nbsp; <Spin size="large" />
</div>
</main>
);
Expand Down
43 changes: 22 additions & 21 deletions components/Share/index.jsx
Original file line number Diff line number Diff line change
@@ -1,50 +1,51 @@
import React from "react";
import {
FacebookShareButton,
FacebookIcon,
TwitterShareButton,
TwitterIcon,
RedditShareButton,
RedditIcon,
WhatsappShareButton,
WhatsappIcon,
LinkedinShareButton,
LinkedinIcon,
TelegramIcon,
TelegramShareButton
import {
FacebookShareButton,
FacebookIcon,
TwitterShareButton,
TwitterIcon,
RedditShareButton,
RedditIcon,
WhatsappShareButton,
WhatsappIcon,
LinkedinShareButton,
LinkedinIcon,
TelegramIcon,
TelegramShareButton
} from "react-share";
import { useDisplaySize } from "../../hooks";

function Share({ url, title }) {
console.log(url, "url from share");
const dSize = useDisplaySize();
const size = dSize === 0 ? 35 : 64;

return (

<div className={`${ dSize === 0 ? "py-6 mt-1":"h-[10em] py-4 mt-4" } ${ dSize === 0 ? "min-w-[20em]":"min-w-[35em]" } rounded-[1em] flex flex-col px-8 justify-center`}>
<div className={`${dSize === 0 ? "py-6 mt-1" : "h-[10em] py-4 mt-4"} ${dSize === 0 ? "min-w-[20em]" : "min-w-[35em]"} rounded-[1em] flex flex-col px-8 justify-center`}>
<div className="text-2xl md:text-4xl font-bold mb-3 text-center text-white">Share</div>
<div className="flex flex-row justify-between w-full">
<FacebookShareButton quote={title} hashtag="" url={url}>
<FacebookIcon size={size} round/>
<FacebookIcon size={size} round />
</FacebookShareButton>

<TwitterShareButton title={title} url={url} >
<TwitterIcon size={size} round/>
<TwitterIcon size={size} round />
</TwitterShareButton>

<RedditShareButton title={title} url={url}>
<RedditIcon size={size} round/>
<RedditIcon size={size} round />
</RedditShareButton>

<WhatsappShareButton title={title} url={url}>
<WhatsappIcon size={size} round/>
<WhatsappIcon size={size} round />
</WhatsappShareButton>

<LinkedinShareButton title={title} url={url}>
<LinkedinIcon size={size} round/>
<LinkedinIcon size={size} round />
</LinkedinShareButton>
<TelegramShareButton title={title} url={url}>
<TelegramIcon size={size} round/>
<TelegramIcon size={size} round />
</TelegramShareButton>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions components/TeamTicket/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ const TeamTicket = (props, this_ref) => {
</div>
</div>

{getMembers().map((member, index) => {
return (
{getMembers()
.filter(member => member.name) // Filter out members with an empty or undefined name
.map((member, index) => (
<div
key={index}
className="flex flex-row items-center mb-[14px]"
Expand All @@ -127,8 +128,7 @@ const TeamTicket = (props, this_ref) => {
{member.name}
</div>
</div>
);
})}
))}
</div>
<div className="flex-grow"></div>
<div className="flex flex-col justify-center items-center mr-[40px]">
Expand Down
2 changes: 1 addition & 1 deletion components/TicketPopup/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function TicketPopup({
/>
}
</div>
<Share url={getShareURL(ticketNo)} title="I got registered for the Mini Hackathon 2024!" />
{/* <Share url={getShareURL(ticketNo)} title="I got registered for the Mini Hackathon 2024!" /> */}
<div className="mt-5">
<button
onClick={saveTicket}
Expand Down

0 comments on commit d0ea30e

Please sign in to comment.