rolled back react and next js from rc

This commit is contained in:
ChrQR 2024-05-28 12:21:27 +02:00
parent 0bb5cdc760
commit fb35d90d9e
5 changed files with 180 additions and 729 deletions

View File

@ -1,17 +0,0 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "src/styles/globals.css",
"baseColor": "slate",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "~/components",
"utils": "~/lib/utils"
}
}

845
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -13,31 +13,25 @@
},
"dependencies": {
"@t3-oss/env-nextjs": "^0.10.1",
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc",
"@types/react": "^18.2.57",
"@types/react-dom": "^18.2.19",
"@vercel/postgres": "^0.8.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"drizzle-orm": "^0.29.4",
"immer": "^10.1.1",
"next": "^15.0.0-rc.0",
"next": "^14.2.3",
"postgres": "^3.4.3",
"react": "^19.0.0-rc-935180c7e0-20240524",
"react-dom": "^19.0.0-rc-935180c7e0-20240524",
"tailwind-merge": "^2.3.0",
"tailwindcss-animate": "^1.0.7",
"zod": "^3.23.8",
"zustand": "^4.5.2"
},
"overrides": {
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc"
},
"devDependencies": {
"@types/eslint": "^8.56.2",
"@types/node": "^20.11.20",
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc",
"@types/react": "^18.2.57",
"@types/react-dom": "^18.2.19",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"drizzle-kit": "^0.21.0",

View File

@ -0,0 +1,3 @@
export default function Wine(wine) {
return <li key={wine.id}>{wine.name}</li>;
}

View File

@ -1,31 +1,17 @@
import { GetServerSideProps } from 'next';
import { getAllWines } from '../../server/actions/getAllWines';
"use server";
import { db } from "~/server/db";
import Wine from "./Wine";
type WineListProps = {
wines: Wine[];
};
export const getServerSideProps: GetServerSideProps = async () => {
const wines = await getAllWines();
return {
props: {
wines,
},
};
};
const WineList: React.FC<WineListProps> = ({ wines }) => {
export default async function WineList() {
const wines = await db.query.wines.findMany();
return (
<>
<h1>All wines:</h1>
<ul>
{wines.map((wine) => (
<li key={wine.id}>{wine.name}</li>
<Wine wine={wine} />
))}
</ul>
</>
);
};
export default WineList;
}