Skip to content

Commit 3bb8058

Browse files
committed
chore: format codebase using Prettier
1 parent 5351c60 commit 3bb8058

36 files changed

Lines changed: 364 additions & 256 deletions

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
"eslint": "^8.56.0",
104104
"jsdom": "^24.0.0",
105105
"prettier": "^3.2.4",
106+
"prettier-plugin-tailwindcss": "^0.6.14",
106107
"prisma": "^5.18.0",
107108
"tailwindcss": "^3.3.0",
108109
"ts-node": "^10.9.2",

pnpm-lock.yaml

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

prisma/seed.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,11 @@ async function seedVideoMetadata() {
211211
video_360p_4: 'https://www.w3schools.com/html/mov_bbb.mp4',
212212
slides:
213213
'https://appx-recordings.s3.ap-south-1.amazonaws.com/drm/100x/slides/Loops%2C+callbacks.pdf',
214-
segments: [
215-
{ title: "Introduction", start: 0, end: 3 },
216-
{ title: "Chapter 1", start: 3, end: 7 },
217-
{ title: "Conclusion", start: 7, end: 10 }
218-
]
214+
segments: [
215+
{ title: 'Introduction', start: 0, end: 3 },
216+
{ title: 'Chapter 1', start: 3, end: 7 },
217+
{ title: 'Conclusion', start: 7, end: 10 },
218+
],
219219
},
220220
});
221221
} catch (error) {

public/footer-logos/logos-svg/insta-logo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22

33
const InstaLogo = () => (
4-
<svg
4+
<svg
55
viewBox="-0.5 -0.5 16 16"
66
fill="none"
77
xmlns="http://www.w3.org/2000/svg"

src/actions/payoutMethods/schema.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import { z } from 'zod';
33
export const payoutMethodSchema = z.object({
44
upiId: z
55
.string()
6-
.refine((value) => (/^[0-9A-Za-z._-]{2,256}@[A-Za-z]{2,64}$/).test(value), {
6+
.refine((value) => /^[0-9A-Za-z._-]{2,256}@[A-Za-z]{2,64}$/.test(value), {
77
message: 'Enter a valid UPI address',
88
})
99
.optional(),
1010
solanaAddress: z
1111
.string()
12-
.refine((value) => (/^[A-Za-z0-9]{44}$/).test(value), {
12+
.refine((value) => /^[A-Za-z0-9]{44}$/.test(value), {
1313
message: 'Enter a valid Solana address',
1414
})
1515
.optional(),
@@ -18,13 +18,13 @@ export const payoutMethodSchema = z.object({
1818
export const upiIdInsertSchema = z.object({
1919
upiId: z
2020
.string()
21-
.refine((value) => (/^[0-9A_Za-z._-]{2,256}@[A_Za-z]{2,64}$/).test(value), {
21+
.refine((value) => /^[0-9A_Za-z._-]{2,256}@[A_Za-z]{2,64}$/.test(value), {
2222
message: 'Invalid UPI address',
2323
}),
2424
});
2525

2626
export const solanaAddressInsertSchema = z.object({
27-
solanaAddress: z.string().refine((value) => (/^[A-Za-z0-9]{44}$/).test(value), {
27+
solanaAddress: z.string().refine((value) => /^[A-Za-z0-9]{44}$/.test(value), {
2828
message: 'Invalid Solana address',
2929
}),
3030
});

src/actions/user/index.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ type GetAppxAuthTokenResponse = {
3434
email: string | null;
3535
appxAuthToken: string | null;
3636
appxUserId: string | null;
37-
}
37+
};
3838

3939
export const GetAppxAuthToken = async (): Promise<GetAppxAuthTokenResponse> => {
4040
const session = await getServerSession(authOptions);
41-
if (!session || !session.user) throw new Error("User is not logged in");
41+
if (!session || !session.user) throw new Error('User is not logged in');
4242

4343
const user = await db.user.findFirst({
4444
where: {
@@ -48,15 +48,18 @@ export const GetAppxAuthToken = async (): Promise<GetAppxAuthTokenResponse> => {
4848
name: true,
4949
email: true,
5050
appxAuthToken: true,
51-
appxUserId: true
52-
}
51+
appxUserId: true,
52+
},
5353
});
5454

55-
if (!user || !user.appxAuthToken) throw new Error("User not found");
55+
if (!user || !user.appxAuthToken) throw new Error('User not found');
5656
return user;
5757
};
5858

59-
export const GetAppxVideoPlayerUrl = async (courseId: string, videoId: string): Promise<string> => {
59+
export const GetAppxVideoPlayerUrl = async (
60+
courseId: string,
61+
videoId: string,
62+
): Promise<string> => {
6063
const { name, email, appxAuthToken, appxUserId } = await GetAppxAuthToken();
6164
const url = `${process.env.APPX_BASE_API}/get/fetchVideoDetailsById?course_id=${courseId}&video_id=${videoId}&ytflag=${1}&folder_wise_course=${1}`;
6265

src/app/api/admin/content/route.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,10 @@ export const POST = async (req: NextRequest) => {
150150
});
151151
}
152152
}
153-
if (discordChecked && (type === 'notion' || type === 'video' || type === 'appx')) {
153+
if (
154+
discordChecked &&
155+
(type === 'notion' || type === 'video' || type === 'appx')
156+
) {
154157
if (!process.env.NEXT_PUBLIC_DISCORD_WEBHOOK_URL) {
155158
return NextResponse.json(
156159
{ message: 'Environment variable for discord webhook is not set' },
@@ -174,7 +177,8 @@ export const POST = async (req: NextRequest) => {
174177
return NextResponse.json(
175178
{
176179
message:
177-
discordChecked && (type === 'notion' || type === 'video' || type === 'appx')
180+
discordChecked &&
181+
(type === 'notion' || type === 'video' || type === 'appx')
178182
? 'Content Added and Discord notification has been sent'
179183
: 'Content has been added',
180184
},

src/app/bounty/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ export default function Page() {
6767

6868
return (
6969
<>
70-
<div className="h-max pb-4 transition-colors duration-500 md:p-8 flex flex-col items-center justify-center w-full">
71-
<div className="mb-6 flex flex-col items-start justify-center px-4 pt-3 sm:px-8 max-w-[90rem] w-full">
70+
<div className="flex h-max w-full flex-col items-center justify-center pb-4 transition-colors duration-500 md:p-8">
71+
<div className="mb-6 flex w-full max-w-[90rem] flex-col items-start justify-center px-4 pt-3 sm:px-8">
7272
<div className="text-2xl text-black transition-colors duration-500 dark:text-white sm:text-3xl">
7373
<h1 className="mt-20 text-black dark:text-white sm:mt-16">
7474
Your Bounties

src/app/certificate/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const CertificatePage = async () => {
55
const certificates = await getCertificates();
66

77
return (
8-
<section className="flex w-full flex-wrap mt-20 items-center justify-center">
8+
<section className="mt-20 flex w-full flex-wrap items-center justify-center">
99
{certificates?.map(({ cert, course, user }) => (
1010
<CertificateComponent
1111
certificateId={cert.id}

src/app/courses/[courseId]/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const Layout = async ({
4949
const fullCourseContent = await getFullCourseContent(parseInt(courseId, 10));
5050
return (
5151
<div className="relative flex min-h-screen flex-col py-24">
52-
<div className="flex justify-between items-center">
52+
<div className="flex items-center justify-between">
5353
<div className="2/3">
5454
<Sidebar fullCourseContent={fullCourseContent} courseId={courseId} />
5555
</div>

0 commit comments

Comments
 (0)