removed react query

This commit is contained in:
polaris
2024-07-01 12:47:02 -04:00
parent 9ca8b1ef97
commit 7be756270e
3 changed files with 27 additions and 37 deletions

View File

@ -2,7 +2,6 @@ import type { Metadata } from "next";
import { GeistSans } from "geist/font/sans"; import { GeistSans } from "geist/font/sans";
import { Toaster } from "@/components/ui/toaster"; import { Toaster } from "@/components/ui/toaster";
import "./globals.css"; import "./globals.css";
import ReactQueryProvider from "./provider";
export const metadata: Metadata = { export const metadata: Metadata = {
title: "Daphnis", title: "Daphnis",
@ -17,9 +16,7 @@ export default function RootLayout({
return ( return (
<html lang="en" className={GeistSans.className}> <html lang="en" className={GeistSans.className}>
<body className={GeistSans.className}> <body className={GeistSans.className}>
<ReactQueryProvider> <main className="">{children} </main>
<main className="">{children} </main>
</ReactQueryProvider>
<Toaster /> <Toaster />
</body> </body>
</html> </html>

View File

@ -1,14 +0,0 @@
"use client";
import { QueryClientProvider, QueryClient } from "@tanstack/react-query";
import { useState } from "react";
const ReactQueryProvider = ({ children }: { children: React.ReactNode }) => {
const [queryClient] = useState(() => new QueryClient());
return (
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
);
};
export default ReactQueryProvider;

View File

@ -24,38 +24,45 @@ export const columns: ColumnDef<chuni_score_playlog & chuni_static_music>[] = [
{ {
accessorKey: "title", accessorKey: "title",
header: "Title", header: "Title",
cell: ({ row }) => <div className="font-medium">{row.original.title}</div>,
},
{
accessorKey: "score",
header: "Score",
cell: ({ row }) => (
<div>
{row.original.score?.toLocaleString()}
{row.original.isNewRecord && <span className="pl-2 ">New!!</span>}{" "}
</div>
),
},
{
accessorKey: "userPlayDate",
header: "Date",
},
{
accessorKey: "FC / AJ",
header: "FC / AJ",
cell: ({ row }) => ( cell: ({ row }) => (
<div> <div>
<div className="font-medium"> <div className="font-medium">
{row.original.title}
<span className="space-x-2 pl-2"> <span className="space-x-2 pl-2">
{row.original.isFullCombo && ( {!row.original.isAllJustice && row.original.isFullCombo && (
<Badge className="rounded-sm">Full Combo</Badge> <span className="">Full Combo</span>
)} )}
{row.original.isAllJustice && ( {row.original.isAllJustice && (
<Badge className="rounded-sm bg-yellow-500 text-black"> <span className=" ">All Justice</span>
All Justice
</Badge>
)}
{row.original.isNewRecord && (
<Badge className="rounded-sm bg-pink-400 text-white">New!!</Badge>
)} )}
</span> </span>
</div> </div>
<div className="text-sm text-muted-foreground truncate inline-block w-[200px]">
{row.original.artist}
</div>
</div> </div>
), ),
}, },
{ {
accessorKey: "score", accessorKey: "Attempts",
header: "Score", header: "Attempts",
cell: ({ row }) => row.original.score?.toLocaleString(), cell: ({ row }) => <div className="font-medium">{row.original.title}</div>,
},
{
accessorKey: "userPlayDate",
header: "Date",
}, },
{ {
id: "actions", id: "actions",