diff --git a/src/actions/commentVote/index.ts b/src/actions/commentVote/index.ts
index 53be3d0c3..069d38134 100644
--- a/src/actions/commentVote/index.ts
+++ b/src/actions/commentVote/index.ts
@@ -20,7 +20,7 @@ const voteHandler = async (
return { error: 'Unauthorized' };
}
- const { questionId, answerId, commentId, voteType, currentPath } = data;
+ const { questionId, answerId, commentId, voteType, currentPath, slug } = data;
if (!questionId && !answerId && !commentId) {
return { error: 'No valid target specified.' };
@@ -142,7 +142,7 @@ const voteHandler = async (
}
if (currentPath) {
- revalidatePath(currentPath);
+ revalidatePath(`${currentPath}/${slug}`);
}
return { data: updatedEntity };
diff --git a/src/actions/commentVote/schema.ts b/src/actions/commentVote/schema.ts
index 28cb1552a..9e1b6bb67 100644
--- a/src/actions/commentVote/schema.ts
+++ b/src/actions/commentVote/schema.ts
@@ -7,4 +7,5 @@ export const VoteHandleSchema = z.object({
answerId: z.number().optional(),
voteType: z.nativeEnum(VoteType),
currentPath: z.string(),
+ slug: z.string(),
});
diff --git a/src/app/admin/add-course/page.tsx b/src/app/admin/add-course/page.tsx
index dace4c5a8..d4b6d5609 100644
--- a/src/app/admin/add-course/page.tsx
+++ b/src/app/admin/add-course/page.tsx
@@ -1,12 +1,7 @@
'use client';
import { Button } from '@/components/ui/button';
-import {
- Card,
- CardContent,
- CardHeader,
- CardTitle,
-} from '@/components/ui/card';
+import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import {
Form,
FormControl,
@@ -29,7 +24,7 @@ import {
AccordionContent,
AccordionItem,
AccordionTrigger,
-} from "@/components/ui/accordion";
+} from '@/components/ui/accordion';
import { Cuboid, PackagePlus } from 'lucide-react';
import { FaDiscord } from 'react-icons/fa';
@@ -86,24 +81,32 @@ export default function Courses() {
return (
-
-
+
- View Content
+ View Content
-
+
-
-
-
New course
+
+
-
-
Create new course for 100xdevs community and let user explore new courses
-
-
+
+
+ Create new course for 100xdevs community and let user explore
+ new courses
+
+
+
{/* Create a new course */}
Fill in the course details below
@@ -121,7 +124,11 @@ export default function Courses() {
Title
-
+
@@ -134,7 +141,11 @@ export default function Courses() {
Image url
-
+
@@ -144,11 +155,12 @@ export default function Courses() {
control={form.control}
name="description"
render={({ field }: { field: any }) => (
-
+
Description
@@ -163,7 +175,11 @@ export default function Courses() {
Slug
-
+
@@ -176,7 +192,11 @@ export default function Courses() {
Id
-
+
@@ -189,7 +209,11 @@ export default function Courses() {
Admin Secret
-
+
@@ -203,7 +227,8 @@ export default function Courses() {
app x course id
@@ -231,7 +256,9 @@ export default function Courses() {
{isLoading ? (
) : (
-
+
)}
@@ -243,24 +270,28 @@ export default function Courses() {
-
-
-
-
Discord Config
+
+
+
+ Discord Config
-
-
Mangae discord configuration for the users
-
-
+
+
+ Mangae discord configuration for the users
+
+
+
Discord
-
+
- Allow user another account in cohort 3
+
+ Allow user another account in cohort 3
+
{
try {
- const res = await axios.post('/api/admin/discordReset', {
- email,
- adminPassword,
- });
+ const res = await axios.post(
+ '/api/admin/discordReset',
+ {
+ email,
+ adminPassword,
+ },
+ );
toast(JSON.stringify(res.data.data));
} catch (error) {
//@ts-ignore
@@ -295,9 +329,11 @@ export default function Courses() {
-
+
- Get users discord username in cohort 3
+
+ Get users discord username in cohort 3
+
-
-
);
}
diff --git a/src/app/admin/comment/ApproveComment.tsx b/src/app/admin/comment/ApproveComment.tsx
index 23f7c40a0..4a36bb9ec 100644
--- a/src/app/admin/comment/ApproveComment.tsx
+++ b/src/app/admin/comment/ApproveComment.tsx
@@ -12,7 +12,7 @@ import {
AccordionContent,
AccordionItem,
AccordionTrigger,
-} from "@/components/ui/accordion";
+} from '@/components/ui/accordion';
import { ShieldCheck } from 'lucide-react';
const ApproveComment = () => {
@@ -40,29 +40,37 @@ const ApproveComment = () => {
});
};
return (
-
-
-
-
-
+
+
+
+
+
Approve Comment
-