Skip to content

Commit

Permalink
Merge pull request #12 from EnigmaData/main
Browse files Browse the repository at this point in the history
Latest Deployed Branch
  • Loading branch information
ShubhAgarwal-dev authored Oct 28, 2023
2 parents a3a1278 + f74fc70 commit aad30fc
Show file tree
Hide file tree
Showing 16 changed files with 119 additions and 67 deletions.
24 changes: 12 additions & 12 deletions app/events/data.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import blocksData from '@/types/Block/blockCard.types'

import basic_img from '@/public/Projects/Images/GRAND.png'

const data: blocksData = [
{
heading: 'AlgoUniversity Code Rush',
time: 'May',
heading: 'Toolset Unbounded',
time: 'June - July',
content:
'We will try to replicate GRAND Chip, or try to get near that to make a universal encoding and decoding FPGA',
knowMoreLink: 'https://www.granddecoder.mit.edu/',
image: basic_img.src,
'The problem Statement involves developing a GUI frontend with a user-friendly UI/UX. It includes a secure signup/login page with password/OTP protection. Implement a lossless image and text compression/decompression algorithms. Compressed images are stored in a secure database, and a file management system allows users to add/delete their images. You are free to choose various components, and exploration is encouraged.',
knowMoreLink:
'https://drive.google.com/file/d/15gb-OIBMqm8VlWeJ3AOWYgFbwCTwLM4d/view?usp=sharing',
image: '/Events/pics/IMAGE_CODING_CLUB_01.jpg',
},
{
heading: 'Toolset Unbounded',
time: 'June - July',
heading: 'Bitwise Symphony',
time: 'July',
content:
'We will try to replicate GRAND Chip, or try to get near that to make a universal encoding and decoding FPGA',
knowMoreLink: 'https://www.granddecoder.mit.edu/',
image: basic_img.src,
'Unleash your algorithmic prowess, crafting a symphony from integers. Witness the mesmerizing rise of numbers, powered by bitwise sorcery. Seek the harmonies that transcend ordinariness, forging an ascending masterpiece. Dare you compose the ultimate melody, or chase the enigmatic crescendo? Enter the realm of Bitwise Symphony!.',
knowMoreLink:
'https://drive.google.com/file/d/1oYef04uoGGo2glUbUzRyPpaeH74GXIer/view?usp=sharing',
image: '/Events/pics/sar.png',
},
]

Expand Down
3 changes: 3 additions & 0 deletions app/members/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import { SiBmcsoftware, SiCodeforces } from 'react-icons/si'
import { IoGameController } from 'react-icons/io5'
import { IoIosPeople } from 'react-icons/io'

import Header from '@/components/Members/Header'

const MEMBERS_REVALIDATION_TIME = 60 * 60 * 12
// Keep this very high in the deployed version

Expand Down Expand Up @@ -160,6 +162,7 @@ const Page = async () => {
return (
<>
<div className={styles.membersWrapper}>
<Header />
<Tabs.Group
aria-label='Default tabs'
style='default'
Expand Down
20 changes: 10 additions & 10 deletions app/projects/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ const data: blocksData = [
image: SCA.src,
time: 'FOSS',
},
{
heading: '2D-Platformer Game',
content:
'Currently we are developing a 2D top down game ,based on the theme of ruin exploration, set on a fictional stage. \
This game boasts a rich world filled with exploration and adventure.',
knowMoreLink:
'https://docs.google.com/document/d/1QNEcDAQeoi_AZt7qXQF7T2RmdZCxovqfjODHy5joCzw/edit?usp=sharing',
image: gd.src,
time: 'Game Dev',
},
// {
// heading: '2D-Platformer Game',
// content:
// 'Currently we are developing a 2D top down game ,based on the theme of ruin exploration, set on a fictional stage. \
// This game boasts a rich world filled with exploration and adventure.',
// knowMoreLink:
// 'https://docs.google.com/document/d/1QNEcDAQeoi_AZt7qXQF7T2RmdZCxovqfjODHy5joCzw/edit?usp=sharing',
// image: gd.src,
// time: 'Game Dev',
// },
]

export default data
4 changes: 2 additions & 2 deletions components/AppBar/AppBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ export default function AppBar() {
<div>Home</div>
</Link>
</div>
{/* <div className={styles.option}>
<div className={styles.option}>
<Link href='/events' scroll={false}>
<div>Events</div>
</Link>
</div> */}
</div>
<div className={styles.option}>
<Link href='/projects' scroll={false}>
<div>Projects</div>
Expand Down
34 changes: 34 additions & 0 deletions components/Members/Header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import Link from 'next/link'

const Header = () => {
return (
<>
<section className='bg-transparent font-sans'>
<div className='py-4 px-4 mx-auto max-w-screen-xl sm:py-8 md:px-0'>
<div className='max-w-screen-md'>
<h2 className='mb-4 text-3xl md:text-5xl tracking-tight font-extrabold text-white'>
Unlock Your Potential: Join the Coding Club and Shape Your Digital
Future!
</h2>
<p className='mb-1 font-light sm:text-xl text-gray-400'>
Empower yourself at our Coding Club. Join now to shape your
digital destiny and unleash your true potential in a world driven
by code.
</p>
<div className='flex flex-col mt-4 space-y-4 sm:flex-row sm:space-y-0 sm:space-x-4'>
<Link
href='/members/wanna_join'
target='_top'
className='inline-flex items-center justify-center px-4 py-2.5 text-base font-medium text-center border rounded-lg focus:ring-4 text-white border-gray-600 hover:bg-gray-700 focus:ring-gray-600'
>
Enrollement Policy
</Link>
</div>
</div>
</div>
</section>
</>
)
}

export default Header
6 changes: 3 additions & 3 deletions components/Registration/RegBlock/RegBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ const RegBlock = ({ title, inputs, handleChangeInput, type }: Props) => {
},
setAuthState,
)
if (authState.error === null) {
router.push('/leaderboard')
}
// if (authState.error === null) {
// router.push('/leaderboard')
// }
}

return (
Expand Down
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const nextConfig = {
images: {
domains: ['drive.google.com', 'https://drive.google.com'],
},
pageExtensions: ['page.tsx', 'page.ts', 'page.jsx', 'page.js'],
}

module.exports = nextConfig
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"seed": "ts-node --compiler-options {\"module\":\"CommonJS\"} prisma/seed.ts"
},
"dependencies": {
"@prisma/client": "4.15.0",
"@prisma/client": "^5.1.1",
"@types/node": "^20.3.1",
"@types/react": "18.2.7",
"@types/react-dom": "18.2.4",
Expand All @@ -32,7 +32,7 @@
"next-auth": "^4.23.0",
"postcss": "8.4.24",
"prettier": "2.8.8",
"prisma": "^4.15.0",
"prisma": "^5.1.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-icons": "^4.10.1",
Expand Down
18 changes: 12 additions & 6 deletions pages/api/codeforces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
}),
errorMessage: 'Invalid Length Roll Number Detected',
},
{
valid: validator.isNumeric(rollNumber),
errorMessage: 'Invalid Characters Detected in Roll Number',
},
// {
// valid: validator.isNumeric(rollNumber),
// errorMessage: 'Invalid Characters Detected in Roll Number',
// },
]

validtionSchema.forEach(check => {
Expand All @@ -46,7 +46,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {

try {
const userWithRollNumber = await prisma.codeforcesLeaderBoard.findUnique({
where: { rollNumber: BigInt(rollNumber) },
where: { rollNumber: String(rollNumber) },
})
if (userWithRollNumber) {
return res.status(400).json({
Expand Down Expand Up @@ -96,11 +96,17 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
})
}

if (num_contest === 0) {
return res.status(400).json({
errorMessage: 'Number of contests given are nill',
})
}

try {
const coder = await prisma.codeforcesLeaderBoard.create({
data: {
name: fullName,
rollNumber: BigInt(rollNumber),
rollNumber: String(rollNumber),
rating: Number(rating),
last_contest_id: Number(last_contest),
contests: Number(num_contest),
Expand Down
12 changes: 6 additions & 6 deletions pages/api/leetcode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
}),
errorMessage: 'Invalid Length Roll Number Detected',
},
{
valid: validator.isNumeric(rollNumber),
errorMessage: 'Invalid Characters Detected in Roll Number',
},
// {
// valid: validator.isNumeric(rollNumber),
// errorMessage: 'Invalid Characters Detected in Roll Number',
// },
]

validtionSchema.forEach(check => {
Expand All @@ -47,7 +47,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {

try {
const userWithRollNumber = await prisma.leetCodeLeaderBoard.findUnique({
where: { rollNumber: BigInt(rollNumber) },
where: { rollNumber: String(rollNumber) },
})
if (userWithRollNumber) {
return res.status(400).json({
Expand Down Expand Up @@ -108,7 +108,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
const coder = await prisma.leetCodeLeaderBoard.create({
data: {
name: fullName,
rollNumber: BigInt(rollNumber),
rollNumber: String(rollNumber),
userHandle: userHandle,
ranking: ranking,
stars: points,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- AlterTable
ALTER TABLE "CodeforcesLeaderBoard" ALTER COLUMN "rollNumber" SET DATA TYPE TEXT;

-- AlterTable
ALTER TABLE "LeetCodeLeaderBoard" ALTER COLUMN "rollNumber" SET DATA TYPE TEXT;

-- AlterTable
ALTER TABLE "Members" ALTER COLUMN "roll_number" SET DATA TYPE TEXT;
2 changes: 1 addition & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ datasource db {
model Members {
id String @id @default(uuid())
name String
roll_number Int @unique
roll_number String @unique
wing Wing
created_at DateTime @default(now())
updated_at DateTime @updatedAt
Expand Down
12 changes: 6 additions & 6 deletions prisma/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ const prisma = new PrismaClient()

async function main() {
const shubh = await prisma.members.upsert({
where: { roll_number: 210020047 },
where: { roll_number: '210020047' },
update: {},
create: {
roll_number: 210020047,
roll_number: '210020047',
name: 'Shubh Agarwal',
wing: 'FOSS',
leetcode: {
Expand All @@ -26,11 +26,11 @@ async function main() {
})

const saksham = await prisma.members.upsert({
where: { roll_number: 210010046 },
where: { roll_number: '210010046' },
update: {},
create: {
name: 'Saksham Chhimwal',
roll_number: 210010046,
roll_number: '210010046',
wing: 'FOSS',
codeforces: {
create: {
Expand All @@ -43,11 +43,11 @@ async function main() {
})

const ayush = await prisma.members.upsert({
where: { roll_number: 210020048 },
where: { roll_number: '210020048' },
update: {},
create: {
name: 'Ayush Singhi',
roll_number: 210020048,
roll_number: '210020048',
wing: 'GAME_DEV',
game_dev: {
create: {
Expand Down
Binary file added public/Events/pics/IMAGE_CODING_CLUB_01.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Events/pics/sar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 19 additions & 19 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -258,22 +258,22 @@
resolved "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz"
integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==

"@prisma/client@4.15.0":
version "4.15.0"
resolved "https://registry.npmjs.org/@prisma/client/-/client-4.15.0.tgz"
integrity sha512-xnROvyABcGiwqRNdrObHVZkD9EjkJYHOmVdlKy1yGgI+XOzvMzJ4tRg3dz1pUlsyhKxXGCnjIQjWW+2ur+YXuw==
"@prisma/client@^5.1.1":
version "5.1.1"
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.1.1.tgz#ea2b0c8599bdb3f86d92e8df46fba795a744db01"
integrity sha512-fxcCeK5pMQGcgCqCrWsi+I2rpIbk0rAhdrN+ke7f34tIrgPwA68ensrpin+9+fZvuV2OtzHmuipwduSY6HswdA==
dependencies:
"@prisma/engines-version" "4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944"
"@prisma/engines-version" "5.1.1-1.6a3747c37ff169c90047725a05a6ef02e32ac97e"

"@prisma/engines-version@4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944":
version "4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944"
resolved "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.15.0-28.8fbc245156db7124f997f4cecdd8d1219e360944.tgz"
integrity sha512-sVOig4tjGxxlYaFcXgE71f/rtFhzyYrfyfNFUsxCIEJyVKU9rdOWIlIwQ2NQ7PntvGnn+x0XuFo4OC1jvPJKzg==
"@prisma/engines-version@5.1.1-1.6a3747c37ff169c90047725a05a6ef02e32ac97e":
version "5.1.1-1.6a3747c37ff169c90047725a05a6ef02e32ac97e"
resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.1.1-1.6a3747c37ff169c90047725a05a6ef02e32ac97e.tgz#2e8a1f098ec09452dbe00923b24f582f95d1747c"
integrity sha512-owZqbY/wucbr65bXJ/ljrHPgQU5xXTSkmcE/JcbqE1kusuAXV/TLN3/exmz21SZ5rJ7WDkyk70J2G/n68iogbQ==

"@prisma/engines@4.15.0":
version "4.15.0"
resolved "https://registry.npmjs.org/@prisma/engines/-/engines-4.15.0.tgz"
integrity sha512-FTaOCGs0LL0OW68juZlGxFtYviZa4xdQj/rQEdat2txw0s3Vu/saAPKjNVXfIgUsGXmQ72HPgNr6935/P8FNAA==
"@prisma/engines@5.1.1":
version "5.1.1"
resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.1.1.tgz#9c26d209f93a563e048eab63b1976f222f1707d0"
integrity sha512-NV/4nVNWFZSJCCIA3HIFJbbDKO/NARc9ej0tX5S9k2EVbkrFJC4Xt9b0u4rNZWL4V+F5LAjvta8vzEUw0rw+HA==

"@rushstack/eslint-patch@^1.1.3":
version "1.3.2"
Expand Down Expand Up @@ -2518,15 +2518,15 @@ [email protected]:

pretty-format@^3.8.0:
version "3.8.0"
resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-3.8.0.tgz"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-3.8.0.tgz#bfbed56d5e9a776645f4b1ff7aa1a3ac4fa3c385"
integrity sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew==

prisma@^4.15.0:
version "4.15.0"
resolved "https://registry.npmjs.org/prisma/-/prisma-4.15.0.tgz"
integrity sha512-iKZZpobPl48gTcSZVawLMQ3lEy6BnXwtoMj7hluoGFYu2kQ6F9LBuBrUyF95zRVnNo8/3KzLXJXJ5TEnLSJFiA==
prisma@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.1.1.tgz#8f5c0f9467a828746cb94f846d694dc7b7481a9e"
integrity sha512-WJFG/U7sMmcc6TjJTTifTfpI6Wjoh55xl4AzopVwAdyK68L9/ogNo8QQ2cxuUjJf/Wa82z/uhyh3wMzvRIBphg==
dependencies:
"@prisma/engines" "4.15.0"
"@prisma/engines" "5.1.1"

prop-types@^15.8.1:
version "15.8.1"
Expand Down

0 comments on commit aad30fc

Please sign in to comment.