Skip to content

Commit

Permalink
revert datatable changes
Browse files Browse the repository at this point in the history
  • Loading branch information
noxify committed Jan 21, 2024
1 parent 0888ca0 commit fa67c24
Show file tree
Hide file tree
Showing 21 changed files with 50 additions and 1,347 deletions.
5 changes: 4 additions & 1 deletion apps/nextjs/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import "@acme/auth/env"
const config = {
reactStrictMode: true,
experimental: {
serverComponentsExternalPackages: ["oslo", "@icons-pack/react-simple-icons"],
serverComponentsExternalPackages: [
"oslo",
"@icons-pack/react-simple-icons",
],
},
/** Enables hot reloading for local packages without a build step */
transpilePackages: [
Expand Down
44 changes: 44 additions & 0 deletions apps/nextjs/src/app/(authorized)/(tasks)/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { Suspense } from "react"
import { redirect } from "next/navigation"

import { auth } from "@acme/auth"

import { CreatePostForm, PostCardSkeleton, PostList } from "@/components/posts"
import { api } from "@/trpc/server"

export default async function HomePage() {
//await new Promise((resolve) => setTimeout(resolve, 5000))

const session = await auth()

if (!session.user) {
redirect("/auth")
}

const posts = api.post.all()

return (
<main className="container h-screen py-16">
<div className="flex flex-col items-center justify-center gap-4">
<h1 className="text-5xl font-extrabold tracking-tight sm:text-[5rem]">
Create <span className="text-primary">T3</span> Turbo
</h1>

<CreatePostForm />
<div className="w-full max-w-2xl overflow-y-scroll">
<Suspense
fallback={
<div className="flex w-full flex-col gap-4">
<PostCardSkeleton />
<PostCardSkeleton />
<PostCardSkeleton />
</div>
}
>
<PostList posts={posts} />
</Suspense>
</div>
</div>
</main>
)
}
42 changes: 0 additions & 42 deletions apps/nextjs/src/app/(authorized)/tasks/page.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions packages/api/src/root.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { authRouter } from "./router/auth"
import { postRouter } from "./router/post"
import { taskRouter } from "./router/task"
import { userRouter } from "./router/user"
import { createTRPCRouter } from "./trpc"

export const appRouter = createTRPCRouter({
auth: authRouter,
post: postRouter,
user: userRouter,
task: taskRouter,
})

// export type definition of API
Expand Down
103 changes: 0 additions & 103 deletions packages/api/src/router/task.ts

This file was deleted.

32 changes: 0 additions & 32 deletions packages/db/src/filter-column.ts

This file was deleted.

6 changes: 1 addition & 5 deletions packages/db/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ import mysql from "mysql2/promise"

import * as auth from "./schema/auth"
import * as post from "./schema/post"
import * as task from "./schema/task"

export * from "./filter-column"
export const schema = { ...auth, ...post, ...task }
export const schema = { ...auth, ...post }

export { mySqlTable as tableCreator } from "./schema/_table"

Expand All @@ -20,5 +18,3 @@ const connection = await mysql.createConnection({
})

export const db = drizzle(connection, { schema, mode: "default" })

export type Task = typeof task.task.$inferSelect
28 changes: 0 additions & 28 deletions packages/db/src/schema/task.ts

This file was deleted.

5 changes: 1 addition & 4 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
"./checkbox": "./src/checkbox.tsx",
"./badge": "./src/badge.tsx",
"./popover": "./src/popover.tsx",
"./table": "./src/table.tsx",
"./datatable": "./src/datatable/data-table.tsx",
"./datatable/hooks": "./src/datatable/hooks/index.ts"
"./table": "./src/table.tsx"
},
"license": "MIT",
"scripts": {
Expand All @@ -45,7 +43,6 @@
"@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-slot": "1.0.2",
"@radix-ui/react-toast": "^1.1.5",
"@tanstack/react-table": "8.11.6",
"class-variance-authority": "0.7.0",
"cmdk": "^0.2.0",
"next-themes": "0.2.1",
Expand Down
Loading

0 comments on commit fa67c24

Please sign in to comment.