updated create region form
All checks were successful
Vercel Production Deployment / Deploy-Production (push) Successful in 1m26s
All checks were successful
Vercel Production Deployment / Deploy-Production (push) Successful in 1m26s
This commit is contained in:
parent
2c5fcbcbdb
commit
14b14f9f26
@ -2,6 +2,7 @@ import { db } from "~/server/db";
|
||||
|
||||
export default async function AllRegions() {
|
||||
const allRegions = await db.query.regions.findMany();
|
||||
const allCountries = await db.query.countries.findMany();
|
||||
return (
|
||||
<div className="pt-4">
|
||||
<h1 className="text-2xl">All Regions:</h1>
|
||||
@ -9,7 +10,14 @@ export default async function AllRegions() {
|
||||
<>
|
||||
<ul>
|
||||
{allRegions.map((region) => (
|
||||
<li key={region.id}>{region.name}</li>
|
||||
<li key={region.id}>
|
||||
{region.name} -{" "}
|
||||
{
|
||||
allCountries.find(
|
||||
(country) => country.id === region.countryId,
|
||||
)?.name
|
||||
}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</>
|
||||
|
@ -11,7 +11,6 @@ import {
|
||||
SelectValue,
|
||||
} from "~/components/ui/select";
|
||||
import { useFormState } from "react-dom";
|
||||
import { init } from "next/dist/compiled/webpack/webpack";
|
||||
|
||||
interface Country {
|
||||
id: string;
|
||||
|
Loading…
Reference in New Issue
Block a user