File tree Expand file tree Collapse file tree 7 files changed +14
-16
lines changed Expand file tree Collapse file tree 7 files changed +14
-16
lines changed Original file line number Diff line number Diff line change 1- import { NextResponse } from ' next/server' ;
1+ import { NextResponse } from " next/server" ;
22
33export async function GET ( ) {
4- return NextResponse . json ( { message : ' Hello from the server!' } ) ;
4+ return NextResponse . json ( { message : " Hello from the server!" } ) ;
55}
Original file line number Diff line number Diff line change 1- ' use client' ;
1+ " use client" ;
22import "@/styles/globals.css" ;
33import { ReactNode } from "react" ;
44import { QueryClient , QueryClientProvider } from "@tanstack/react-query" ;
5- import { ReactQueryDevtools } from "@tanstack/react-query-devtools" ;
65
76const queryClient = new QueryClient ( ) ;
87
@@ -12,7 +11,6 @@ export default function RootLayout({ children }: { children: ReactNode }) {
1211 < body >
1312 < QueryClientProvider client = { queryClient } >
1413 { children }
15- { /* <ReactQueryDevtools initialIsOpen={false} /> */ }
1614 </ QueryClientProvider >
1715 </ body >
1816 </ html >
Original file line number Diff line number Diff line change 1- ' use client'
2- import { useStore } from ' @/store/useStore'
1+ " use client" ;
2+ import { useStore } from " @/store/useStore" ;
33
44export default function Home ( ) {
55 const count = useStore ( ( state ) => state . count ) ;
Original file line number Diff line number Diff line change 1- import { useEffect , useState } from ' react' ;
1+ import { useEffect , useState } from " react" ;
22
33export function useDebounce < T > ( value : T , delay : number ) : T {
44 const [ debouncedValue , setDebouncedValue ] = useState ( value ) ;
Original file line number Diff line number Diff line change 1- import { PrismaClient } from ' @prisma/client'
1+ import { PrismaClient } from " @prisma/client" ;
22
33const globalForPrisma = globalThis as unknown as {
44 prisma : PrismaClient | undefined
5- }
5+ } ;
66
77export const prisma =
88 globalForPrisma . prisma ||
99 new PrismaClient ( {
10- log : [ ' query' ]
11- } )
10+ log : [ " query" ]
11+ } ) ;
1212
13- if ( process . env . NODE_ENV !== ' production' ) globalForPrisma . prisma = prisma
13+ if ( process . env . NODE_ENV !== " production" ) globalForPrisma . prisma = prisma ;
Original file line number Diff line number Diff line change 11export function cn ( ...classes : string [ ] ) {
2- return classes . filter ( Boolean ) . join ( ' ' ) ;
2+ return classes . filter ( Boolean ) . join ( " " ) ;
33}
Original file line number Diff line number Diff line change 11// src/store/useStore.ts
2- import { create } from ' zustand'
2+ import { create } from " zustand" ;
33
44type State = {
55 count : number
@@ -9,4 +9,4 @@ type State = {
99export const useStore = create < State > ( ( set ) => ( {
1010 count : 0 ,
1111 increment : ( ) => set ( ( state ) => ( { count : state . count + 1 } ) ) ,
12- } ) )
12+ } ) ) ;
You can’t perform that action at this time.
0 commit comments