-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Setup queries for organisasi pages
- Loading branch information
1 parent
d16b977
commit 1e5a3e7
Showing
3 changed files
with
45 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Organisasi_Type } from "@prisma/client"; | ||
import { notFound } from "next/navigation"; | ||
|
||
import { findOrganisasi } from "@/utils/database/organisasi.query"; | ||
import { findPeriod } from "@/utils/database/period.query"; | ||
|
||
export default async function OrganisasiByPeriod({ | ||
param, | ||
}: { | ||
param: { slug: string; period: string }; | ||
}) { | ||
const period = await findPeriod(param.period); | ||
if (!period) return notFound(); | ||
|
||
const organisasi = await findOrganisasi({ | ||
organisasi_period_id: { | ||
organisasi: param.slug.toUpperCase() as Organisasi_Type, | ||
period_id: period.id, | ||
}, | ||
}); | ||
console.log(organisasi); | ||
|
||
return <></>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters