File tree Expand file tree Collapse file tree 7 files changed +562
-52
lines changed
app/(root)/questions/[id] Expand file tree Collapse file tree 7 files changed +562
-52
lines changed Original file line number Diff line number Diff line change 24
24
"[javascriptreact]" : {
25
25
"editor.defaultFormatter" : " esbenp.prettier-vscode"
26
26
},
27
- "typescript.tsdk" : " node_modules/typescript/lib" ,
28
- "files.exclude" : {
29
- "**/.vscode" : true ,
30
- "**/.next" : true ,
31
- // "**/.git": false,
32
- "**/node_modules" : true ,
33
- "next-env.d.ts" : true
34
- // "**/components.json": true
35
- }
27
+ "typescript.tsdk" : " node_modules/typescript/lib"
36
28
}
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ import React from "react";
3
3
4
4
import { auth } from "@/auth" ;
5
5
import QuestionForm from "@/components/forms/QuestionForm" ;
6
- import { getQuestion } from "@/lib/actions/question.action" ;
7
6
import ROUTES from "@/constants/routes" ;
7
+ import { getQuestion } from "@/lib/actions/question.action" ;
8
8
9
9
const EditQuestion = async ( { params } : RouteParams ) => {
10
10
const { id } = await params ;
Original file line number Diff line number Diff line change
1
+ import Link from "next/link" ;
2
+ import { redirect } from "next/navigation" ;
3
+ import React from "react" ;
4
+
1
5
import TagCard from "@/components/cards/TagCard" ;
2
6
import { Preview } from "@/components/editor/Preview" ;
3
7
import Metric from "@/components/Metric" ;
4
8
import UserAvatar from "@/components/UserAvatar" ;
5
9
import ROUTES from "@/constants/routes" ;
6
10
import { getQuestion } from "@/lib/actions/question.action" ;
7
11
import { formatNumber , getTimeStamp } from "@/lib/utils" ;
8
- import Link from "next/link" ;
9
- import { redirect } from "next/navigation" ;
10
- import React from "react" ;
12
+
11
13
import View from "../view" ;
12
14
13
15
const QuestionDetails = async ( { params } : RouteParams ) => {
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ const config = [
21
21
"next/typescript" ,
22
22
"standard" ,
23
23
"plugin:tailwindcss/recommended" ,
24
- "plugin:prettier/recommended" ,
25
24
"prettier"
26
25
) ,
27
26
{
@@ -56,7 +55,7 @@ const config = [
56
55
} ,
57
56
} ,
58
57
] ,
59
- "comma-dangle" : "es5 " ,
58
+ "comma-dangle" : "off " ,
60
59
} ,
61
60
} ,
62
61
{
Original file line number Diff line number Diff line change 1
1
"use server" ;
2
2
3
3
import mongoose , { Error , FilterQuery } from "mongoose" ;
4
+ import { revalidatePath } from "next/cache" ;
4
5
6
+ import ROUTES from "@/constants/routes" ;
5
7
import Question , { IQuestionDoc } from "@/database/question.model" ;
6
8
import TagQuestion from "@/database/tag-question.model" ;
7
9
import Tag , { ITagDoc } from "@/database/tag.model" ;
@@ -15,8 +17,6 @@ import {
15
17
IncrementViewsSchema ,
16
18
PaginatedSearchParamsSchema ,
17
19
} from "../validations" ;
18
- import { revalidatePath } from "next/cache" ;
19
- import ROUTES from "@/constants/routes" ;
20
20
21
21
export async function createQuestion (
22
22
params : CreateQuestionParams
You can’t perform that action at this time.
0 commit comments