Added post component for events

This needs RLS disabled, will work on that later, I don't like postgre
This commit is contained in:
Alexis
2024-06-01 11:07:07 +02:00
parent f2d5277c5f
commit a92edd6215
12 changed files with 474 additions and 100 deletions

View File

@@ -1,3 +1,5 @@
import { z } from "zod"
export interface RPGDate {
day: number
month: number
@@ -6,23 +8,8 @@ export interface RPGDate {
export type RPGDateOrder = 'asc' | 'desc'
// export function getRelativeDate(baseDate: RPGDate, relativeDate: RPGDate) {
// let newDay: number
// let newMonth: number
// let newYear: number
// let newPeriod: RPGPeriod
// const differenceInDays = getDifferenceInDays(baseDate, relativeDate)
// // console.log(baseDate, substractionDate)
// console.log(getRelativeString(baseDate, relativeDate))
// return differenceInDays
// // return {
// // day: newDay,
// // month: newMonth,
// // year: newYear,
// // period: newPeriod
// // }
// }
export const dateSchema = z.object({
day: z.number().int().positive(),
month: z.number().int(),
year: z.number().int()
})