Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
arshsaxena committed Aug 4, 2024
1 parent c9bc46b commit b943f8d
Show file tree
Hide file tree
Showing 31 changed files with 619 additions and 690 deletions.
47 changes: 29 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,42 @@
Local dev setup
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

1. Install project dependencies
## Getting Started

```
npm i
First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

2. Create a .env file from the .env.example file
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

<<<<<<< Updated upstream
```
cp .env.example .env
npx prisma studio
```
=======
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

3. Seed the database
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

```
npm run db:seed
```
## Learn More

3. Run the project
To learn more about Next.js, take a look at the following resources:

```
npm run dev
```
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

Use prisma studio to view the database
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

```
npx prisma studio
```
## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
>>>>>>> Stashed changes
4 changes: 2 additions & 2 deletions app/admin/data-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export function DataTable<TData, TValue>({
? null
: flexRender(
header.column.columnDef.header,
header.getContext()
header.getContext(),
)}
</TableHead>
);
Expand All @@ -144,7 +144,7 @@ export function DataTable<TData, TValue>({
<TableCell key={cell.id}>
{flexRender(
cell.column.columnDef.cell,
cell.getContext()
cell.getContext(),
)}
</TableCell>
))}
Expand Down
2 changes: 1 addition & 1 deletion app/api/admin/responses/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const POST = async (request: NextRequest) => {
} catch (error) {
return NextResponse.json(
{ error: "Error finding responses" },
{ status: 500 }
{ status: 500 },
);
}
};
4 changes: 2 additions & 2 deletions app/api/form/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const schema = z
{
message: "Both departments cannot be same",
path: ["department1", "department2"],
}
},
);

export const POST = async (request: NextRequest) => {
Expand Down Expand Up @@ -60,7 +60,7 @@ export const POST = async (request: NextRequest) => {
if (acceptApplication?.value === false) {
return NextResponse.json(
{ error: "We are not accepting applications at this time." },
{ status: 200 }
{ status: 200 },
);
}

Expand Down
2 changes: 1 addition & 1 deletion app/api/recruitment/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const POST = async (request: NextRequest) => {
if (acceptApplication?.value === false) {
return NextResponse.json(
{ error: "We are not accepting applications at this time." },
{ status: 200 }
{ status: 200 },
);
}

Expand Down
4 changes: 2 additions & 2 deletions app/api/submitted/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ export const POST = async (request: NextRequest) => {
if (formSubmitted?.isFormSubmitted) {
return NextResponse.json(
{ error: "Form already submitted" },
{ status: 200 }
{ status: 200 },
);
} else {
return NextResponse.json(
{ message: "Form not submitted" },
{ status: 200 }
{ status: 200 },
);
}
} catch (error) {
Expand Down
80 changes: 43 additions & 37 deletions app/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,45 +1,51 @@
"use client";

import { FaBlogger, FaDiscord, FaGithub, FaInstagram, FaLinkedin, FaXTwitter } from 'react-icons/fa6';
import {
FaBlogger,
FaDiscord,
FaGithub,
FaInstagram,
FaLinkedin,
FaXTwitter,
} from "react-icons/fa6";

const Footer = () => {
return (

<div className="footer flex justify-between items-center w-full px-5 md:px-10 bg-blue-950 text-black">
<div className="flex justify-center items-center py-5 mx-auto">
<div className="pr-2">
<a href="https://www.linkedin.com/company/cyscomvit" target='_blank'>
<FaLinkedin size={26} color="#ffffff" />
</a>
</div>
<div className="md:px-2 px-2 ">
<a href="https://twitter.com/CyscomVit" target='_blank'>
<FaXTwitter size={26} color="#ffffff" />
</a>
</div>
<div className="md:px-2 px-2 ">
<a href="https://instagram.com/cyscomvit" target='_blank'>
<FaInstagram size={26} color="#ffffff" />
</a>
</div>
<div className="md:px-2 px-2 ">
<a href="https://blog.cyscomvit.com" target='_blank'>
<FaBlogger size={26} color="#ffffff" />
</a>
</div>
<div className="md:px-2 px-2 ">
<a href="https://github.com/cyscomvit" target='_blank'>
<FaGithub size={26} color="#ffffff" />
</a>
</div>
<div className="md:px-2 px-2 ">
<a href="https://discord.gg/9RyHCQgjAv" target='_blank'>
<FaDiscord size={26} color="#ffffff" />
</a>
</div>
</div>
return (
<div className="footer flex justify-between items-center w-full px-5 md:px-10 bg-blue-950 text-black">
<div className="flex justify-center items-center py-5 mx-auto">
<div className="pr-2">
<a href="https://www.linkedin.com/company/cyscomvit" target="_blank">
<FaLinkedin size={26} color="#ffffff" />
</a>
</div>
<div className="md:px-2 px-2 ">
<a href="https://twitter.com/CyscomVit" target="_blank">
<FaXTwitter size={26} color="#ffffff" />
</a>
</div>
<div className="md:px-2 px-2 ">
<a href="https://instagram.com/cyscomvit" target="_blank">
<FaInstagram size={26} color="#ffffff" />
</a>
</div>
<div className="md:px-2 px-2 ">
<a href="https://blog.cyscomvit.com" target="_blank">
<FaBlogger size={26} color="#ffffff" />
</a>
</div>
<div className="md:px-2 px-2 ">
<a href="https://github.com/cyscomvit" target="_blank">
<FaGithub size={26} color="#ffffff" />
</a>
</div>
<div className="md:px-2 px-2 ">
<a href="https://discord.gg/9RyHCQgjAv" target="_blank">
<FaDiscord size={26} color="#ffffff" />
</a>
</div>
);
</div>
</div>
);
};

export default Footer;
14 changes: 11 additions & 3 deletions app/components/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Image from "next/image";
import Logo from "../static/cyscom-logo.png";

import { Button } from "@/components/ui/button";
import { FaGoogle } from 'react-icons/fa6';
import { FaGoogle } from "react-icons/fa6";

const Nav = () => {
const { data: session } = useSession();
Expand Down Expand Up @@ -33,9 +33,17 @@ const Nav = () => {
<Link href="/admin">Admin</Link>
)}
{session ? (
<Button className='bg-white text-black hover:bg-gray-200' onClick={() => signOut()}>Sign out</Button>
<Button
className="bg-white text-black hover:bg-gray-200"
onClick={() => signOut()}
>
Sign out
</Button>
) : (
<Button className='bg-white text-black hover:bg-gray-200' onClick={() => signIn("google")}>
<Button
className="bg-white text-black hover:bg-gray-200"
onClick={() => signIn("google")}
>
Sign in with Google
<FaGoogle className="ml-2" />
</Button>
Expand Down
14 changes: 7 additions & 7 deletions app/form/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const formSchema = z
{
message: "Both departments cannot be same",
path: ["department2"],
}
},
);

export default function FormPage() {
Expand Down Expand Up @@ -147,7 +147,7 @@ export default function FormPage() {
backgroundImage: `url(${bg.src})`,
backgroundSize: "cover",
backgroundPosition: "center",
height: backgroundHeight,
height: "100vh",
}}
>
<div className="flex flex-col items-center justify-center w-full p-6 md:p-12">
Expand All @@ -157,7 +157,7 @@ export default function FormPage() {
Hello, {session?.user?.name}! 👋🏻
</h2>
<p className="mt-6 text-md md:text-xl">
We are not accepting applications at this time
We are not accepting applications at this time.
</p>
</div>
) : isFormSubmitted ? (
Expand All @@ -166,7 +166,7 @@ export default function FormPage() {
Hello, {session?.user?.name}! 👋🏻
</h2>
<p className="mt-6 text-md md:text-xl">
Thank you for applying! We got your application
Thank you for applying! We got your application.
</p>
</div>
) : (
Expand All @@ -190,7 +190,7 @@ export default function FormPage() {
disabled
{...field}
value={session?.user?.name}
className="w-[300px]"
className="w-[250px]"
/>
</FormControl>
<FormMessage />
Expand All @@ -207,7 +207,7 @@ export default function FormPage() {
disabled
{...field}
value={session?.user?.email}
className="w-[300px]"
className="w-[250px]"
/>
</FormControl>
<FormMessage />
Expand All @@ -224,7 +224,7 @@ export default function FormPage() {
disabled
{...field}
value={session?.user?.regno}
className="w-[300px]"
className="w-[250px]"
/>
</FormControl>
<FormMessage />
Expand Down
4 changes: 4 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,7 @@
@apply bg-background text-foreground;
}
}

body {
font-family: Inter !important;
}
8 changes: 4 additions & 4 deletions app/interview/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ const Interview = () => {
backgroundImage: `url(${bg.src})`,
backgroundSize: "cover",
backgroundPosition: "center",
height: "86vh",
height: "100vh",
}}
>
<div className="flex flex-col justify-center items-center h-[30%] text-center w-[85%] md:w-[50%] m-auto">
{!isFormSubmitted ? (
<div className="flex flex-col justify-center items-center mt-12 md:mt-24">
<h2 className="mt-10 scroll-m-20 pb-2 text-2xl md:text-4xl font-semibold tracking-tight transition-colors first:mt-0">
You have not submitted the form yet
You have not submitted the form yet.
</h2>
</div>
) : shortlist ? (
Expand All @@ -66,7 +66,7 @@ const Interview = () => {
Congratulations, {session?.user?.name}! 🎉
</h2>
<p className="mt-6 text-md md:text-xl">
🗓️ You have been shortlisted for an online interview on{" "}
🗓️ You have been shortlisted for an online interview on .
{dateAssigned}
</p>
</div>
Expand All @@ -88,7 +88,7 @@ const Interview = () => {
Thank you for filling the form!🤩
</h2>
<p className="mt-6 text-md md:text-xl">
We will be releasing the results for the interview round shortly
We will be releasing the results for the interview round shortly.
</p>
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function RootLayout({
<body
className={cn(
"flex flex-col min-h-screen bg-background font-sans antialiased bg-white",
fontSans.variable
fontSans.variable,
)}
>
<Providers>
Expand Down
Loading

0 comments on commit b943f8d

Please sign in to comment.