chore: lint fix

This commit is contained in:
Michael Zetterberg
2024-04-22 06:58:50 +02:00
parent abdc48f57f
commit 14e93eba7c
82 changed files with 282 additions and 160 deletions

View File

@@ -1,12 +1,12 @@
import d from "dayjs"
import isToday from "dayjs/plugin/isToday"
import relativeTime from "dayjs/plugin/relativeTime"
import "dayjs/locale/da"
import "dayjs/locale/de"
import "dayjs/locale/fi"
import "dayjs/locale/sv"
import d from "dayjs"
import isToday from "dayjs/plugin/isToday"
import relativeTime from "dayjs/plugin/relativeTime"
/**
* dayjs export Norwegian as nb [Norwegian Bokmål] so here we create the same
* setup as nb has.

View File

@@ -1,9 +1,11 @@
import "server-only"
import { request } from "./request"
import type { Data } from "@/types/request"
import type { BatchRequestDocument } from "graphql-request"
import type { Data } from "@/types/request"
export async function batchRequest<T>(
queries: (BatchRequestDocument & NextFetchRequestConfig)[]
): Promise<Data<T>> {

View File

@@ -1,11 +1,13 @@
import "server-only"
import ContentstackLivePreview from "@contentstack/live-preview-utils"
import { request as graphqlRequest } from "graphql-request"
import { env } from "@/env/server"
import ContentstackLivePreview from "@contentstack/live-preview-utils"
import type { DocumentNode } from "graphql"
import type { Data } from "@/types/request"
import type { DocumentNode } from "graphql"
export async function previewRequest<T>(
query: string | DocumentNode,

View File

@@ -1,11 +1,14 @@
import "server-only"
import { GraphQLClient } from "graphql-request"
import { env } from "@/env/server"
import { cache } from "react"
import type { Data } from "@/types/request"
import { env } from "@/env/server"
import type { DocumentNode } from "graphql"
import type { Data } from "@/types/request"
const client = new GraphQLClient(env.CMS_URL, {
fetch: cache(async function (
url: URL | RequestInfo,

View File

@@ -1,12 +1,14 @@
"use client"
import { useState } from "react"
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
import { httpBatchLink } from "@trpc/client"
import { useState } from "react"
import { env } from "@/env/client"
import { trpc } from "./client"
import { transformer } from "@/server/transformer"
import { trpc } from "./client"
function initializeTrpcClient() {
return trpc.createClient({
links: [