Skip to content

Commit

Permalink
Innovance is Coming Soon
Browse files Browse the repository at this point in the history
  • Loading branch information
kpriyanshu2003 authored Nov 11, 2024
1 parent f17cfba commit fba68fc
Show file tree
Hide file tree
Showing 16 changed files with 66 additions and 41 deletions.
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
NEXT_PUBLIC_BASE_URL
TOKEN
NEXT_PUBLIC_CLIENT_URL
EMAIL_USER
EMAIL_PASS
OTP_URL
5 changes: 5 additions & 0 deletions app/api/otp/send/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { NextResponse } from "next/server";

export async function POST(request: Request) {
return NextResponse.json({
success: false,
message: "Internal server error",
});

const { email, rollNo } = await request.json();
try {
const response = await fetch(`${process.env.OTP_URL}/api/otp/send`, {
Expand Down
5 changes: 5 additions & 0 deletions app/api/otp/verify/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { NextResponse } from "next/server";

export async function POST(request: Request) {
return NextResponse.json({
success: false,
message: "Internal server error",
});

const { email, otp } = await request.json();
try {
const response = await fetch(`${process.env.OTP_URL}/api/otp/verify`, {
Expand Down
5 changes: 5 additions & 0 deletions app/api/register/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import fs from "fs/promises";
import path from "path";

export async function POST(request: Request) {
return NextResponse.json({
success: false,
message: "Internal server error",
});

const data = await request.json();

try {
Expand Down
5 changes: 5 additions & 0 deletions app/api/verified_user/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { NextResponse } from "next/server";

export async function POST(request: Request) {
return NextResponse.json({
success: false,
message: "Internal server error",
});

const data = await request.json();
try {
const apiResponse = await fetch(`${process.env.OTP_URL}/api/email/verify`, {
Expand Down
4 changes: 2 additions & 2 deletions app/components/About.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use client";
import React from "react";
import { Bitter } from "@next/font/google";
import { Bitter } from "next/font/google";
import Star from "@/app/components/global/Star";
import { Poppins } from "@next/font/google";
import { Poppins } from "next/font/google";
const bitter = Bitter({ subsets: ["latin"] });
const poppins = Poppins({ subsets: ["latin"], weight: ["400", "700"] });
function About() {
Expand Down
2 changes: 1 addition & 1 deletion app/components/EventSchedule/EventSchedule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React, { useState, useEffect } from "react";
import { MdLocationPin } from "react-icons/md";
import { motion } from "framer-motion";
import { Poppins } from "@next/font/google";
import { Poppins } from "next/font/google";


interface ScheduleItem {
Expand Down
2 changes: 1 addition & 1 deletion app/components/FAQ/FAQ.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useState} from "react";
import {Poppins} from "@next/font/google";
import {Poppins} from "next/font/google";
import {motion, AnimatePresence} from "framer-motion";

const poppins = Poppins({
Expand Down
9 changes: 5 additions & 4 deletions app/components/Hero/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function Hero() {
Forge the Future with AI
</motion.div>
<div
className="block relative w-[11rem] mx-auto"
className="block relative w-[16rem] mx-auto"
onMouseEnter={() => setIsHovered(!isHovered)}
onMouseLeave={() => setIsHovered(!isHovered)}
>
Expand All @@ -59,16 +59,17 @@ export default function Hero() {
animate={{ y: 0 }}
transition={{ duration: 0.5, ease: [0.17, 0.55, 0.55, 1] }}
whileHover={{ color: "#3b82f6", borderColor: "#3b82f6" }}
className="w-full h-full text-background relative z-10 py-2 px-5 border border-background"
className="w-full h-full text-background relative z-10 py-2 px-5 border border-background whitespace-nowrap"
>
GET TICKET
COMING SOON
{/* REGISTRATIONS CLOSED */}
{/* GET TICKET */}
</motion.button>
</Link>
</div>
</div>
</div>
<div id="marquee" className="font-geistMono mt-2 md:mt-0">
{" "}
{/* Adjusted margin */}
<div className="w-[calc(100vw+8px)] -left-[6px] -skew-x-[10deg] -rotate-[10deg] sm:-rotate-6 sm:-skew-x-6 md:-rotate-[4deg] md:-skew-x-[4deg] lg:-rotate-3 lg:-skew-x-3 bg-blue-500 absolute z-20 shadow-[0px_0px_10px_10px_#00000024]">
<Marquee
Expand Down
2 changes: 1 addition & 1 deletion app/components/Registration/registration.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from "react";
import { motion } from "framer-motion";
import Image from "next/image";
import { Poppins } from "@next/font/google";
import { Poppins } from "next/font/google";
import QRCode from "react-qr-code";
import { useRef } from "react";
import { Bounce, ToastContainer, toast } from "react-toastify";
Expand Down
2 changes: 1 addition & 1 deletion app/components/Timer/Timer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { useEffect, useState } from "react";
import { Poppins } from "@next/font/google";
import { Poppins } from "next/font/google";

const poppins = Poppins({
weight: ["400", "500", "700"],
Expand Down
6 changes: 4 additions & 2 deletions app/components/Timer/TimerSection.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";
import React, { useState } from "react";
import Timer from "./Timer";
import { Bitter } from "@next/font/google";
import { Bitter } from "next/font/google";
import dynamic from "next/dynamic";
import { motion } from "framer-motion";
import Star from "../global/Star";
Expand Down Expand Up @@ -61,7 +61,9 @@ const TimerSection = ({ text1, text2 }: Props) => {
whileHover={{ color: "#3b82f6", borderColor: "#3b82f6" }}
className="w-full h-full text-background relative z-10 py-2 px-5 border border-background"
>
GET TICKET
COMING SOON
{/* GET TICKET */}
{/* REGISTRATIONS CLOSED */}
</motion.button>
</Link>
</div>
Expand Down
20 changes: 8 additions & 12 deletions app/components/global/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Image from "next/image";
import logo from "../../../public/assets/img/logo-dark.png";
export default function Navbar() {
const [isOpen, setIsOpen] = useState(false);
const [isHovered, setIsHovered] = useState(false);
// const [isHovered, setIsHovered] = useState(false);

const toggleMenu = () => {
setIsOpen(!isOpen);
Expand Down Expand Up @@ -58,14 +58,10 @@ export default function Navbar() {
Contact
</Link>
</div>
<div
{/* <div
className="hidden md:block relative"
onMouseEnter={() => {
setIsHovered(!isHovered);
}}
onMouseLeave={() => {
setIsHovered(!isHovered);
}}
onMouseEnter={() => setIsHovered(!isHovered)}
onMouseLeave={() => setIsHovered(!isHovered)}
>
<motion.div
initial={{ width: "100%" }}
Expand All @@ -82,15 +78,15 @@ export default function Navbar() {
GET TICKET
</motion.button>
</Link>
</div>
</div> */}
<div className="md:hidden flex justify-center items-center">
<HamburgerButton isOpen={isOpen} toggleMenu={toggleMenu} />
</div>
</nav>
{/* <hr className="mx-4 z-40 relative" /> */}
<AnimatePresence>
{isOpen && (
<div className={`relative`} onClick={()=>toggleMenu()}>
<div className={`relative`} onClick={() => toggleMenu()}>
<motion.div
key={"hamburger"}
initial="hidden"
Expand Down Expand Up @@ -130,11 +126,11 @@ export default function Navbar() {
>
Contact
</Link>
<Link href="/registrations">
{/* <Link href="/registrations">
<button className="py-2 px-5 border border-foreground text-blue-300 transition-all">
GET TICKET
</button>
</Link>
</Link> */}
</motion.div>
</div>
)}
Expand Down
28 changes: 17 additions & 11 deletions middleware.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
import { NextResponse } from "next/server";
import type { NextRequest } from "next/server";
const protectedPath = "/register-internal-2411";
// const protectedPath = "/register-internal-2411";

export function middleware(request: NextRequest) {
const { pathname } = request.nextUrl;
if (pathname.startsWith(protectedPath)) {
const authToken = request.cookies.get("auth-token");
if (authToken?.value !== process.env.TOKEN || !authToken) {
const url = new URL("/", request.url);
return NextResponse.redirect(url);
}
}
return NextResponse.next();
// const { pathname } = request.nextUrl;

// if (pathname.startsWith(protectedPath)) {
// const authToken = request.cookies.get("auth-token");
// if (authToken?.value !== process.env.TOKEN || !authToken) {
const url = new URL("/", request.url);
return NextResponse.redirect(url);
// }
// }
// return NextResponse.next();
}

export const config = {
matcher: ["/register-internal-2411"],
matcher: [
"/register-internal-2411",
"/registrations",
"/ticket",
"/ticket/:path*",
],
};
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
},
"dependencies": {
"@devnomic/marquee": "^1.0.2",
"@next/font": "^14.2.15",
"@nextui-org/react": "^2.4.8",
"framer-motion": "^11.11.11",
"html2canvas": "^1.4.1",
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,6 @@
dependencies:
glob "10.3.10"

"@next/font@^14.2.15":
version "14.2.15"
resolved "https://registry.yarnpkg.com/@next/font/-/font-14.2.15.tgz#4e6f0d5b14ecc6b6dea7c1b07e42855e5f14823a"
integrity sha512-QopYhBmCDDrNDynbi+ZD1hDZXmQXVFo7TmAFp4DQgO/kogz1OLbQ92hPigJbj572eZ3GaaVxNIyYVn3/eAsehg==

"@next/[email protected]":
version "14.2.15"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.15.tgz#6386d585f39a1c490c60b72b1f76612ba4434347"
Expand Down

0 comments on commit fba68fc

Please sign in to comment.