diff --git a/app/events/[eventId]/page.tsx b/app/events/[eventId]/page.tsx index ea5b257..f70d5f2 100644 --- a/app/events/[eventId]/page.tsx +++ b/app/events/[eventId]/page.tsx @@ -1,3 +1,4 @@ +import Link from 'next/link'; import { notFound } from 'next/navigation'; import { getEventInsecure } from '../../../database/events'; @@ -51,6 +52,10 @@ export default async function EventPage(props: Props) { {singleEvent.organizerUrl}
+
+
+ Back to Upcoming Events +
); } diff --git a/app/post/PostEventForm.tsx b/app/post/PostEventForm.tsx index e69de29..4e8286f 100644 --- a/app/post/PostEventForm.tsx +++ b/app/post/PostEventForm.tsx @@ -0,0 +1,22 @@ +'use client'; + +import { useState } from 'react'; +import { Event } from '../../database/events'; + +type Props = { + events: Event[]; +}; + +export default function RegisterForm(props: Props) { + const [name, setName] = useState(''); + const [type, setType] = useState(''); + const [date, setDate] = useState(''); + const [location, setLocation] = useState(''); + const [duration, setDuration] = useState(''); + const [entryFee, setEntryFee] = useState(''); + const [category, setCategory] = useState(''); + const [description, setDescription] = useState(''); + const [image, setImage] = useState(''); + const [organizerUrl, setOrganizerUrl] = useState(''); + const [ageRestriction, setAgeRestriction] = useState(''); +} diff --git a/database/events.ts b/database/events.ts index 585978d..2e7e1f9 100644 --- a/database/events.ts +++ b/database/events.ts @@ -62,7 +62,7 @@ export const createEvent = cache( archived ) ( SELECT - ${newEvent.userId}, + user_id, ${newEvent.name}, ${newEvent.type}, ${newEvent.date}, diff --git a/package.json b/package.json index 990d903..7cdb17b 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@types/node": "^20.14.10", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", - "eslint-config-upleveled": "^8.5.0", + "eslint-config-upleveled": "^8.6.3", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "libpg-query": "^16.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ba400e5..db7b08d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -76,8 +76,8 @@ importers: specifier: ^18.3.0 version: 18.3.0 eslint-config-upleveled: - specifier: ^8.5.0 - version: 8.6.2(@babel/core@7.24.7)(@types/eslint@8.56.10)(@types/node@20.14.10)(@types/react-dom@18.3.0)(@types/react@18.3.3)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.0-alpha.41(eslint@9.5.0)(typescript@5.5.3))(eslint@9.5.0))(eslint@9.5.0)(globals@14.0.0)(typescript@5.5.3) + specifier: ^8.6.3 + version: 8.6.3(@babel/core@7.24.7)(@types/eslint@8.56.10)(@types/node@20.14.10)(@types/react-dom@18.3.0)(@types/react@18.3.3)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.0-alpha.41(eslint@9.5.0)(typescript@5.5.3))(eslint@9.5.0))(eslint@9.5.0)(globals@14.0.0)(typescript@5.5.3) jest: specifier: ^29.7.0 version: 29.7.0(@types/node@20.14.10) @@ -1707,8 +1707,8 @@ packages: eslint-config-flat-gitignore@0.1.7: resolution: {integrity: sha512-K4UcPriNg6IvNozipPVnLRxuhxys9vRkxYoLLdMPgPDngtWEP/xBT946oUYQHUWLoz4jvX5k+AF/MWh3VN5Lrg==} - eslint-config-upleveled@8.6.2: - resolution: {integrity: sha512-hu4DsmlNT2NDvvm7xc6h6alh5cEBZf/b3BfWweEJBGCnIqHyE/kumauDGQJSZq2RLp+gphua/Tqgn0dcut2zgA==} + eslint-config-upleveled@8.6.3: + resolution: {integrity: sha512-R3Z0ddfwLEARwX2tXziVvdrSi482VjyuLqUHhZ+rFhavA2vC+Xf2vIb2h2ZmF/C9rroQemWPFQo+cv5XzZOIyg==} engines: {node: '>=20.9.0'} hasBin: true peerDependencies: @@ -5735,7 +5735,7 @@ snapshots: find-up: 7.0.0 parse-gitignore: 2.0.0 - eslint-config-upleveled@8.6.2(@babel/core@7.24.7)(@types/eslint@8.56.10)(@types/node@20.14.10)(@types/react-dom@18.3.0)(@types/react@18.3.3)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.0-alpha.41(eslint@9.5.0)(typescript@5.5.3))(eslint@9.5.0))(eslint@9.5.0)(globals@14.0.0)(typescript@5.5.3): + eslint-config-upleveled@8.6.3(@babel/core@7.24.7)(@types/eslint@8.56.10)(@types/node@20.14.10)(@types/react-dom@18.3.0)(@types/react@18.3.3)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@8.0.0-alpha.41(eslint@9.5.0)(typescript@5.5.3))(eslint@9.5.0))(eslint@9.5.0)(globals@14.0.0)(typescript@5.5.3): dependencies: '@babel/eslint-parser': 7.24.8(@babel/core@7.24.7)(eslint@9.5.0) '@eslint/compat': 1.1.1