diff --git a/app/api/hackbyte4/route.ts b/app/api/hackbyte4/route.ts index 6c7351f..079a615 100644 --- a/app/api/hackbyte4/route.ts +++ b/app/api/hackbyte4/route.ts @@ -1,6 +1,10 @@ import axios from "axios" export async function POST(request: Request) { + const origin = request.headers.get("origin") + if (origin !== process.env.NEXT_PUBLIC_ORIGIN_URL) { + return new Response("Origin not allowed", { status: 403 }) + } const body = await request.json() console.log(body.body) diff --git a/app/contact/page.jsx b/app/contact/page.jsx index 1d01806..27f3fcb 100644 --- a/app/contact/page.jsx +++ b/app/contact/page.jsx @@ -1,8 +1,8 @@ -import { Card } from "@/components/ui/card"; -import { Train, Plane, Bus } from "lucide-react"; -import Image from "next/image"; -import Link from "next/link"; -import phoneImg from "@/public/Contact/phone.png"; +import { Card } from "@/components/ui/card" +import { Train, Plane, Bus } from "lucide-react" +import Image from "next/image" +import Link from "next/link" +import phoneImg from "@/public/Contact/phone.png" export const metadata = { title: "Contact | HackByte", @@ -20,7 +20,7 @@ export const metadata = { type: "website", locale: "en_US", }, -}; +} export default function ContactSection() { return ( @@ -87,6 +87,16 @@ export default function ContactSection() { +
+

Email us at:

+ + hackbyte@iiitdmj.ac.in + +
+

Address

@@ -96,7 +106,7 @@ export default function ContactSection() {

-
+ {/*

Reaching IIITDM Jabalpur

@@ -164,8 +174,8 @@ export default function ContactSection() {

-
+ */} - ); + ) } diff --git a/app/humans/page.tsx b/app/humans/page.tsx index 89857c3..cb5e302 100644 --- a/app/humans/page.tsx +++ b/app/humans/page.tsx @@ -1,12 +1,12 @@ -import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; -import HumansCard from "@/components/HumansCard"; -import Image from "next/image"; -import { MagicCard } from "@/components/ui/magic-card"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" +import HumansCard from "@/components/HumansCard" +import Image from "next/image" +import { MagicCard } from "@/components/ui/magic-card" -import humansSticker from "@/public/humansPage/humansSticker.svg"; -import { OrganizersData } from "@/data/organizersData"; -import { MentorsData } from "@/data/mentorsData"; -import { FamilyData } from "@/data/familyData"; +import humansSticker from "@/public/humansPage/humansSticker.svg" +import { OrganizersData } from "@/data/organizersData" +import { MentorsData } from "@/data/mentorsData" +import { FamilyData } from "@/data/familyData" export const metadata = { title: "Humans | HackByte", @@ -25,7 +25,7 @@ export const metadata = { type: "website", locale: "en_US", }, -}; +} const Humans = () => { return ( @@ -38,7 +38,7 @@ const Humans = () => {
Meet the Humans -
of HackByte +
of HackByte 3.0

Hacker Experience is what we prioritize! Have questions, need @@ -130,7 +130,7 @@ const Humans = () => {

- ); -}; + ) +} -export default Humans; +export default Humans diff --git a/app/page.tsx b/app/page.tsx index 9b7a648..a65c0c0 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -117,6 +117,29 @@ export default function Home() { return (
{/* */} +
+ + Major League Hacking 2026 Hackathon Season + +

Can't wait for Hackbyte 4.0? diff --git a/components/HB4Form/country.json b/components/HB4Form/country.json new file mode 100644 index 0000000..bf9fea7 --- /dev/null +++ b/components/HB4Form/country.json @@ -0,0 +1 @@ +[{"Name":"Afghanistan","Code":"AF"},{"Name":"Albania","Code":"AL"},{"Name":"Algeria","Code":"DZ"},{"Name":"American Samoa","Code":"AS"},{"Name":"Andorra","Code":"AD"},{"Name":"Angola","Code":"AO"},{"Name":"Anguilla","Code":"AI"},{"Name":"Antarctica","Code":"AQ"},{"Name":"Antigua and Barbuda","Code":"AG"},{"Name":"Argentina","Code":"AR"},{"Name":"Armenia","Code":"AM"},{"Name":"Aruba","Code":"AW"},{"Name":"Australia","Code":"AU"},{"Name":"Austria","Code":"AT"},{"Name":"Azerbaijan","Code":"AZ"},{"Name":"Bahamas","Code":"BS"},{"Name":"Bahrain","Code":"BH"},{"Name":"Bangladesh","Code":"BD"},{"Name":"Barbados","Code":"BB"},{"Name":"Belarus","Code":"BY"},{"Name":"Belgium","Code":"BE"},{"Name":"Belize","Code":"BZ"},{"Name":"Benin","Code":"BJ"},{"Name":"Bermuda","Code":"BM"},{"Name":"Bhutan","Code":"BT"},{"Name":"Bolivia, Plurinational State of","Code":"BO"},{"Name":"Bonaire, Sint Eustatius and Saba","Code":"BQ"},{"Name":"Bosnia and Herzegovina","Code":"BA"},{"Name":"Botswana","Code":"BW"},{"Name":"Bouvet Island","Code":"BV"},{"Name":"Brazil","Code":"BR"},{"Name":"British Indian Ocean Territory","Code":"IO"},{"Name":"Brunei Darussalam","Code":"BN"},{"Name":"Bulgaria","Code":"BG"},{"Name":"Burkina Faso","Code":"BF"},{"Name":"Burundi","Code":"BI"},{"Name":"Cambodia","Code":"KH"},{"Name":"Cameroon","Code":"CM"},{"Name":"Canada","Code":"CA"},{"Name":"Cape Verde","Code":"CV"},{"Name":"Cayman Islands","Code":"KY"},{"Name":"Central African Republic","Code":"CF"},{"Name":"Chad","Code":"TD"},{"Name":"Chile","Code":"CL"},{"Name":"China","Code":"CN"},{"Name":"Christmas Island","Code":"CX"},{"Name":"Cocos (Keeling) Islands","Code":"CC"},{"Name":"Colombia","Code":"CO"},{"Name":"Comoros","Code":"KM"},{"Name":"Congo","Code":"CG"},{"Name":"Congo, the Democratic Republic of the","Code":"CD"},{"Name":"Cook Islands","Code":"CK"},{"Name":"Costa Rica","Code":"CR"},{"Name":"Croatia","Code":"HR"},{"Name":"Cuba","Code":"CU"},{"Name":"Curaçao","Code":"CW"},{"Name":"Cyprus","Code":"CY"},{"Name":"Czech Republic","Code":"CZ"},{"Name":"Côte d'Ivoire","Code":"CI"},{"Name":"Denmark","Code":"DK"},{"Name":"Djibouti","Code":"DJ"},{"Name":"Dominica","Code":"DM"},{"Name":"Dominican Republic","Code":"DO"},{"Name":"Ecuador","Code":"EC"},{"Name":"Egypt","Code":"EG"},{"Name":"El Salvador","Code":"SV"},{"Name":"Equatorial Guinea","Code":"GQ"},{"Name":"Eritrea","Code":"ER"},{"Name":"Estonia","Code":"EE"},{"Name":"Eswatini","Code":"SZ"},{"Name":"Ethiopia","Code":"ET"},{"Name":"Falkland Islands (Malvinas)","Code":"FK"},{"Name":"Faroe Islands","Code":"FO"},{"Name":"Fiji","Code":"FJ"},{"Name":"Finland","Code":"FI"},{"Name":"France","Code":"FR"},{"Name":"French Guiana","Code":"GF"},{"Name":"French Polynesia","Code":"PF"},{"Name":"French Southern Territories","Code":"TF"},{"Name":"Gabon","Code":"GA"},{"Name":"Gambia","Code":"GM"},{"Name":"Georgia","Code":"GE"},{"Name":"Germany","Code":"DE"},{"Name":"Ghana","Code":"GH"},{"Name":"Gibraltar","Code":"GI"},{"Name":"Greece","Code":"GR"},{"Name":"Greenland","Code":"GL"},{"Name":"Grenada","Code":"GD"},{"Name":"Guadeloupe","Code":"GP"},{"Name":"Guam","Code":"GU"},{"Name":"Guatemala","Code":"GT"},{"Name":"Guernsey","Code":"GG"},{"Name":"Guinea","Code":"GN"},{"Name":"Guinea-Bissau","Code":"GW"},{"Name":"Guyana","Code":"GY"},{"Name":"Haiti","Code":"HT"},{"Name":"Heard Island and McDonald Islands","Code":"HM"},{"Name":"Holy See (Vatican City State)","Code":"VA"},{"Name":"Honduras","Code":"HN"},{"Name":"Hong Kong","Code":"HK"},{"Name":"Hungary","Code":"HU"},{"Name":"Iceland","Code":"IS"},{"Name":"India","Code":"IN"},{"Name":"Indonesia","Code":"ID"},{"Name":"Iran, Islamic Republic of","Code":"IR"},{"Name":"Iraq","Code":"IQ"},{"Name":"Ireland","Code":"IE"},{"Name":"Isle of Man","Code":"IM"},{"Name":"Israel","Code":"IL"},{"Name":"Italy","Code":"IT"},{"Name":"Jamaica","Code":"JM"},{"Name":"Japan","Code":"JP"},{"Name":"Jersey","Code":"JE"},{"Name":"Jordan","Code":"JO"},{"Name":"Kazakhstan","Code":"KZ"},{"Name":"Kenya","Code":"KE"},{"Name":"Kiribati","Code":"KI"},{"Name":"Korea, Democratic People's Republic of","Code":"KP"},{"Name":"Korea, Republic of","Code":"KR"},{"Name":"Kuwait","Code":"KW"},{"Name":"Kyrgyzstan","Code":"KG"},{"Name":"Lao People's Democratic Republic","Code":"LA"},{"Name":"Latvia","Code":"LV"},{"Name":"Lebanon","Code":"LB"},{"Name":"Lesotho","Code":"LS"},{"Name":"Liberia","Code":"LR"},{"Name":"Libya","Code":"LY"},{"Name":"Liechtenstein","Code":"LI"},{"Name":"Lithuania","Code":"LT"},{"Name":"Luxembourg","Code":"LU"},{"Name":"Macao","Code":"MO"},{"Name":"Macedonia, the Former Yugoslav Republic of","Code":"MK"},{"Name":"Madagascar","Code":"MG"},{"Name":"Malawi","Code":"MW"},{"Name":"Malaysia","Code":"MY"},{"Name":"Maldives","Code":"MV"},{"Name":"Mali","Code":"ML"},{"Name":"Malta","Code":"MT"},{"Name":"Marshall Islands","Code":"MH"},{"Name":"Martinique","Code":"MQ"},{"Name":"Mauritania","Code":"MR"},{"Name":"Mauritius","Code":"MU"},{"Name":"Mayotte","Code":"YT"},{"Name":"Mexico","Code":"MX"},{"Name":"Micronesia, Federated States of","Code":"FM"},{"Name":"Moldova, Republic of","Code":"MD"},{"Name":"Monaco","Code":"MC"},{"Name":"Mongolia","Code":"MN"},{"Name":"Montenegro","Code":"ME"},{"Name":"Montserrat","Code":"MS"},{"Name":"Morocco","Code":"MA"},{"Name":"Mozambique","Code":"MZ"},{"Name":"Myanmar","Code":"MM"},{"Name":"Namibia","Code":"NA"},{"Name":"Nauru","Code":"NR"},{"Name":"Nepal","Code":"NP"},{"Name":"Netherlands","Code":"NL"},{"Name":"New Caledonia","Code":"NC"},{"Name":"New Zealand","Code":"NZ"},{"Name":"Nicaragua","Code":"NI"},{"Name":"Niger","Code":"NE"},{"Name":"Nigeria","Code":"NG"},{"Name":"Niue","Code":"NU"},{"Name":"Norfolk Island","Code":"NF"},{"Name":"Northern Mariana Islands","Code":"MP"},{"Name":"Norway","Code":"NO"},{"Name":"Oman","Code":"OM"},{"Name":"Pakistan","Code":"PK"},{"Name":"Palau","Code":"PW"},{"Name":"Palestine, State of","Code":"PS"},{"Name":"Panama","Code":"PA"},{"Name":"Papua New Guinea","Code":"PG"},{"Name":"Paraguay","Code":"PY"},{"Name":"Peru","Code":"PE"},{"Name":"Philippines","Code":"PH"},{"Name":"Pitcairn","Code":"PN"},{"Name":"Poland","Code":"PL"},{"Name":"Portugal","Code":"PT"},{"Name":"Puerto Rico","Code":"PR"},{"Name":"Qatar","Code":"QA"},{"Name":"Romania","Code":"RO"},{"Name":"Russian Federation","Code":"RU"},{"Name":"Rwanda","Code":"RW"},{"Name":"Réunion","Code":"RE"},{"Name":"Saint Barthélemy","Code":"BL"},{"Name":"Saint Helena, Ascension and Tristan da Cunha","Code":"SH"},{"Name":"Saint Kitts and Nevis","Code":"KN"},{"Name":"Saint Lucia","Code":"LC"},{"Name":"Saint Martin (French part)","Code":"MF"},{"Name":"Saint Pierre and Miquelon","Code":"PM"},{"Name":"Saint Vincent and the Grenadines","Code":"VC"},{"Name":"Samoa","Code":"WS"},{"Name":"San Marino","Code":"SM"},{"Name":"Sao Tome and Principe","Code":"ST"},{"Name":"Saudi Arabia","Code":"SA"},{"Name":"Senegal","Code":"SN"},{"Name":"Serbia","Code":"RS"},{"Name":"Seychelles","Code":"SC"},{"Name":"Sierra Leone","Code":"SL"},{"Name":"Singapore","Code":"SG"},{"Name":"Sint Maarten (Dutch part)","Code":"SX"},{"Name":"Slovakia","Code":"SK"},{"Name":"Slovenia","Code":"SI"},{"Name":"Solomon Islands","Code":"SB"},{"Name":"Somalia","Code":"SO"},{"Name":"South Africa","Code":"ZA"},{"Name":"South Georgia and the South Sandwich Islands","Code":"GS"},{"Name":"South Sudan","Code":"SS"},{"Name":"Spain","Code":"ES"},{"Name":"Sri Lanka","Code":"LK"},{"Name":"Sudan","Code":"SD"},{"Name":"Suriname","Code":"SR"},{"Name":"Svalbard and Jan Mayen","Code":"SJ"},{"Name":"Sweden","Code":"SE"},{"Name":"Switzerland","Code":"CH"},{"Name":"Syrian Arab Republic","Code":"SY"},{"Name":"Taiwan, Province of China","Code":"TW"},{"Name":"Tajikistan","Code":"TJ"},{"Name":"Tanzania, United Republic of","Code":"TZ"},{"Name":"Thailand","Code":"TH"},{"Name":"Timor-Leste","Code":"TL"},{"Name":"Togo","Code":"TG"},{"Name":"Tokelau","Code":"TK"},{"Name":"Tonga","Code":"TO"},{"Name":"Trinidad and Tobago","Code":"TT"},{"Name":"Tunisia","Code":"TN"},{"Name":"Turkey","Code":"TR"},{"Name":"Turkmenistan","Code":"TM"},{"Name":"Turks and Caicos Islands","Code":"TC"},{"Name":"Tuvalu","Code":"TV"},{"Name":"Uganda","Code":"UG"},{"Name":"Ukraine","Code":"UA"},{"Name":"United Arab Emirates","Code":"AE"},{"Name":"United Kingdom","Code":"GB"},{"Name":"United States","Code":"US"},{"Name":"United States Minor Outlying Islands","Code":"UM"},{"Name":"Uruguay","Code":"UY"},{"Name":"Uzbekistan","Code":"UZ"},{"Name":"Vanuatu","Code":"VU"},{"Name":"Venezuela, Bolivarian Republic of","Code":"VE"},{"Name":"Viet Nam","Code":"VN"},{"Name":"Virgin Islands, British","Code":"VG"},{"Name":"Virgin Islands, U.S.","Code":"VI"},{"Name":"Wallis and Futuna","Code":"WF"},{"Name":"Western Sahara","Code":"EH"},{"Name":"Yemen","Code":"YE"},{"Name":"Zambia","Code":"ZM"},{"Name":"Zimbabwe","Code":"ZW"},{"Name":"Åland Islands","Code":"AX"}] \ No newline at end of file diff --git a/components/HB4Form/index.jsx b/components/HB4Form/index.jsx index 2d2c899..ef7f411 100644 --- a/components/HB4Form/index.jsx +++ b/components/HB4Form/index.jsx @@ -9,16 +9,23 @@ import { Button } from "@/components/ui/button" import { Form, FormControl, - FormDescription, FormField, FormItem, FormLabel, FormMessage, } from "@/components/ui/form" +import { + Select, + SelectContent, + SelectItem, + SelectValue, + SelectTrigger, +} from "@/components/ui/select" import { Input } from "@/components/ui/input" import { Checkbox } from "@/components/ui/checkbox" import { Card, CardContent } from "@/components/ui/card" import axios from "axios" +import countryData from "./country.json" // Define form schema with Zod const formSchema = z.object({ @@ -35,8 +42,7 @@ const formSchema = z.object({ linkedinUrl: z .string() .url({ message: "Valid LinkedIn URL is required" }) - .optional() - .or(z.literal("")), + .includes("linkedin.com", { message: "Invalid linkedin URL" }), // MLH Checkboxes mlhCodeOfConduct: z.literal(true, { @@ -150,6 +156,8 @@ const HB4Form = () => { @@ -228,13 +236,51 @@ const HB4Form = () => { Level of Study* - - - + )} @@ -249,13 +295,23 @@ const HB4Form = () => { Country of Residence * - - - + )} @@ -265,7 +321,9 @@ const HB4Form = () => { name="linkedinUrl" render={({ field }) => ( - LinkedIn URL + + LinkedIn URL * + { {/* MLH Checkboxes */}
-

MLH Agreement

+

MLH Checkboxes

We are currently in the process of partnering with MLH. The following 3 checkboxes are for this partnership. If we do not diff --git a/components/MobileSidebar/index.jsx b/components/MobileSidebar/index.jsx index cd9464c..2d63023 100644 --- a/components/MobileSidebar/index.jsx +++ b/components/MobileSidebar/index.jsx @@ -1,7 +1,7 @@ -"use client"; -import { useAnimate } from "motion/react"; -import closesidebar from "@/public/closesidebar.svg"; -import opensidebar from "@/public/opensidebar.svg"; +"use client" +import { useAnimate } from "motion/react" +import closesidebar from "@/public/closesidebar.svg" +import opensidebar from "@/public/opensidebar.svg" import { Calendar, Handshake, @@ -11,47 +11,47 @@ import { Info, Image as Gallery, Phone, -} from "lucide-react"; -import Image from "next/image"; -import { useState, useEffect, useRef } from "react"; -import Link from "next/link"; -import { usePathname } from "next/navigation"; +} from "lucide-react" +import Image from "next/image" +import { useState, useEffect, useRef } from "react" +import Link from "next/link" +import { usePathname } from "next/navigation" const sidebarLinks = [ { name: "Home", icon: , href: "/" }, { name: "Gallery", icon: , href: "/gallery" }, { name: "Partners", icon: , href: "/partners" }, - { name: "Prizes", icon: , href: "/prizes" }, - { name: "Schedule", icon: , href: "/schedule" }, + // { name: "Prizes", icon: , href: "/prizes" }, + // { name: "Schedule", icon: , href: "/schedule" }, { name: "Humans", icon: , href: "/humans" }, { name: "FAQs", icon: , href: "/faq" }, { name: "Contact", icon: , href: "/contact" }, -]; +] const MobileSidebar = () => { - const [fullyopen, setFullyopen] = useState(false); - const [open, setOpen] = useState(false); - const [scope, animate] = useAnimate(); - const pathname = usePathname(); - const sidebarRef = useRef(null); - const ishome = pathname === "/"; + const [fullyopen, setFullyopen] = useState(false) + const [open, setOpen] = useState(false) + const [scope, animate] = useAnimate() + const pathname = usePathname() + const sidebarRef = useRef(null) + const ishome = pathname === "/" useEffect(() => { const handleClickOutside = (event) => { if (sidebarRef.current && !sidebarRef.current.contains(event.target)) { - setOpen(false); + setOpen(false) } - }; + } if (open) { - document.addEventListener("mousedown", handleClickOutside); + document.addEventListener("mousedown", handleClickOutside) } else { - document.removeEventListener("mousedown", handleClickOutside); + document.removeEventListener("mousedown", handleClickOutside) } return () => { - document.removeEventListener("mousedown", handleClickOutside); - }; - }, [open]); + document.removeEventListener("mousedown", handleClickOutside) + } + }, [open]) useEffect(() => { const animateSidebar = async () => { @@ -60,13 +60,13 @@ const MobileSidebar = () => { scope.current, { height: "400px", width: "65px", borderRadius: "32px" }, { duration: 0.3 } - ); + ) await animate( scope.current, { width: "170px", borderRadius: "32px" }, { delay: 0.3 } - ); - setFullyopen(true); + ) + setFullyopen(true) } else { await animate( scope.current, @@ -76,20 +76,20 @@ const MobileSidebar = () => { stiffness: 90, damping: 15, } - ); - setFullyopen(false); + ) + setFullyopen(false) } - }; + } - animateSidebar(); - }, [open, animate, scope]); + animateSidebar() + }, [open, animate, scope]) return ( <>

{ - scope.current = el; // For animations - sidebarRef.current = el; // For outside click detection + scope.current = el // For animations + sidebarRef.current = el // For outside click detection }} className={`backdrop-blur-xl bg-[#222222] h-[48px] w-[48px] fixed rounded-[32px] z-50 ${ ishome ? "left-4 top-5 " : "right-4 top-5" @@ -133,7 +133,7 @@ const MobileSidebar = () => { )}
- ); -}; + ) +} -export default MobileSidebar; +export default MobileSidebar