Skip to content

Commit 2cbe4ec

Browse files
Refactor TypeScript types in page component and remove ESLint configuration from next.config.ts
1 parent b83c2aa commit 2cbe4ec

File tree

2 files changed

+22
-31
lines changed

2 files changed

+22
-31
lines changed

next.config.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,7 @@ import type { NextConfig } from "next";
22

33
const nextConfig: NextConfig = {
44
/* config options here */
5-
typescript: {
6-
// !! WARN !!
7-
// Dangerously allow production builds to successfully complete even if
8-
// your project has type errors.
9-
// !! WARN !!
10-
ignoreBuildErrors: true,
11-
},
12-
eslint: {
13-
// Warning: This allows production builds to successfully complete even if
14-
// your project has ESLint errors.
15-
ignoreDuringBuilds: true,
16-
},
5+
176
};
187

198
export default nextConfig;

src/app/questions/[quesId]/[quesName]/edit/page.tsx

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,28 @@ import React from "react";
44
import EditQues from "./EditQues";
55
import { Particles } from "@/components/magicui/particles";
66

7-
// { params: { quesId: string; quesName: string } }
7+
type PageProps = {
8+
params: Promise<{ quesId: string; quesName: string }>;
9+
};
810

9-
const Page = async ({ params }: { params: { quesId: string; quesName: string } }) => {
10-
const question = await databases.getDocument(db, questionCollection, params.quesId);
11+
const Page = async ({ params }: PageProps) => {
12+
const { quesId } = await params;
13+
const question = await databases.getDocument(db, questionCollection, quesId);
1114

12-
return (
13-
<div>
14-
<Particles
15-
className="fixed inset-0 h-full w-full"
16-
quantity={500}
17-
ease={100}
18-
color="#ffffff"
19-
refresh
20-
/>
21-
<div className="flex justify-center items-center">
22-
<EditQues question={question} />
23-
</div>
24-
</div>
25-
26-
);
15+
return (
16+
<div>
17+
<Particles
18+
className="fixed inset-0 h-full w-full"
19+
quantity={500}
20+
ease={100}
21+
color="#ffffff"
22+
refresh
23+
/>
24+
<div className="flex justify-center items-center">
25+
<EditQues question={question} />
26+
</div>
27+
</div>
28+
);
2729
};
2830

29-
export default Page;
31+
export default Page;

0 commit comments

Comments
 (0)