Skip to content

Commit d1dc554

Browse files
Add lint and fix types
1 parent 0d4a739 commit d1dc554

4 files changed

Lines changed: 11 additions & 6 deletions

File tree

.eslintrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": [
3+
"next/core-web-vitals",
4+
"next/typescript"
5+
]
6+
}

src/app/(sections)/news/[slug]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { readDocumentWithBlocks } from '@/db/api/documents'
22
import { Document } from '@/components'
33

4-
const NewsPage = async ({ params }: { params: { slug: string } }) => {
4+
const NewsPage = async ({ params }: { params: Promise<{ slug: string }> }) => {
55
const { slug } = await params
66
const document = await readDocumentWithBlocks(slug)
77

src/app/api/graphql/route.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { drizzle } from 'drizzle-orm/vercel-postgres'
66
import { gql } from 'graphql-tag'
77
import { NextRequest } from 'next/server'
88

9-
import { documentBlocks, newsArticle, pages, roles, users } from '@/db/schema'
9+
import { newsArticle, pages, roles, users } from '@/db/schema'
1010
import {
1111
Resources,
1212
PermissionAction,
@@ -260,7 +260,7 @@ const resolvers = {
260260
}
261261
},
262262

263-
pages: async (_parent: unknown, _args: unknown, { db }) => {
263+
pages: async () => {
264264
try {
265265
const result = await getPages()
266266
return result
@@ -292,7 +292,7 @@ const resolvers = {
292292
}
293293
},
294294

295-
documents: async (_parent: unknown, { id }, { db, userData }) => {
295+
documents: async (_parent: unknown, { id }, { userData }) => {
296296
try {
297297
const canDo = isAuthorized({
298298
userData,
@@ -314,7 +314,7 @@ const resolvers = {
314314
}
315315
},
316316

317-
documentBlockById: async (_parent: unknown, { id }, { db }) => {
317+
documentBlockById: async (_parent: unknown, { id }) => {
318318
try {
319319
const result = await readDocumentBlockById(id)
320320
console.log('documentBlockById result :>> ', result)

src/components/Document/DocumentBlockForm.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
CREATE_DOCUMENT_BLOCK,
44
DELETE_DOCUMENT_BLOCK_BY_ID,
55
UPDATE_DOCUMENT_BLOCK_BY_ID,
6-
GET_DOCUMENT_BLOCK_BY_ID,
76
} from '@/db/queries-qraphql'
87
import { useState } from 'react'
98
import classes from './document.module.css'

0 commit comments

Comments
 (0)