Skip to content

Commit 09902d8

Browse files
authored
chore: remove extra subject field (#195)
* chore: remove extra subject field * chore: add prettier checks
1 parent 6064a26 commit 09902d8

File tree

5 files changed

+30
-29
lines changed

5 files changed

+30
-29
lines changed

.husky/_/pre-commit

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
if [ "$SKIP_SIMPLE_GIT_HOOKS" = "1" ]; then
4+
echo "[INFO] SKIP_SIMPLE_GIT_HOOKS is set to 1, skipping hook."
5+
exit 0
6+
fi
7+
8+
if [ -f "$SIMPLE_GIT_HOOKS_RC" ]; then
9+
. "$SIMPLE_GIT_HOOKS_RC"
10+
fi
11+
12+
pnpm format

app/layout.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import './globals.css'
33
import Footer from '@/components/footer'
44
import Header from '@/components/header'
55
import AuthProvider from '@/context/session-provider'
6-
import { Analytics} from '@vercel/analytics/next'
7-
6+
import { Analytics } from '@vercel/analytics/next'
87

98
const inter = Inter({ subsets: ['latin'] })
109

app/upload-papers/page.tsx

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,7 @@
22

33
import React, { useState, useRef, useEffect } from 'react'
44
import { Button } from '@/components/ui/button'
5-
import {
6-
Card,
7-
CardContent,
8-
CardDescription,
9-
CardHeader,
10-
CardTitle,
11-
} from '@/components/ui/card'
5+
import { Card, CardContent } from '@/components/ui/card'
126
import { Input } from '@/components/ui/input'
137
import { Label } from '@/components/ui/label'
148
import { Textarea } from '@/components/ui/textarea'
@@ -25,7 +19,6 @@ import {
2519
Calendar,
2620
BookOpen,
2721
GraduationCap,
28-
FileUp,
2922
CheckCircle,
3023
AlertCircle,
3124
} from 'lucide-react'
@@ -368,23 +361,6 @@ const UploadPaperPage = () => {
368361
/>
369362
</div>
370363

371-
{/* Subject Field */}
372-
<div className="space-y-2">
373-
<Label htmlFor="subject" className="flex items-center gap-2">
374-
<GraduationCap className="h-4 w-4" />
375-
Subject *
376-
</Label>
377-
<Input
378-
id="title"
379-
type="text"
380-
placeholder="Enter the subject name(This gets displayed on the paper page)"
381-
value={formData.subject}
382-
onChange={(e) => handleInputChange('subject', e.target.value)}
383-
className="w-full"
384-
required
385-
/>
386-
</div>
387-
388364
{/* Year and Semester Row */}
389365
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
390366
{/* Year Field */}

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"build": "next build",
88
"start": "next start",
99
"lint": "eslint .",
10-
"format": "prettier --write ."
10+
"format": "prettier --write .",
11+
"prepare": "simple-git-hooks"
1112
},
1213
"dependencies": {
1314
"@radix-ui/react-accordion": "^1.2.12",
@@ -69,6 +70,7 @@
6970
"eslint": "9.35.0",
7071
"eslint-config-next": "15.5.2",
7172
"prettier": "^3.6.2",
73+
"simple-git-hooks": "^2.13.1",
7274
"tailwindcss": "^4.1.13",
7375
"tailwindcss-animate": "^1.0.7",
7476
"typescript": "^5.9.2"
@@ -78,5 +80,8 @@
7880
"bcrypt",
7981
"sharp",
8082
"unrs-resolver"
81-
]
83+
],
84+
"simple-git-hooks": {
85+
"pre-commit": "pnpm format"
86+
}
8287
}

pnpm-lock.yaml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)