diff --git a/src/components/FooterNav.tsx b/src/components/FooterNav.tsx index 84133dc..e3f638d 100644 --- a/src/components/FooterNav.tsx +++ b/src/components/FooterNav.tsx @@ -91,8 +91,8 @@ const FooterNav = ({ onStallingAanmelden, children }: { {!session ? { onStallingAanmelden && onStallingAanmelden() }} - className="font-bold"> - Stalling Aanmelden + className="cursor-pointer font-bold"> + Stalling aanmelden : null} {navItemsPrimary.map(x => = 12 && (filterQuery && filterQuery.length > 0) ) { - console.log('filtered', filtered) filtered = filtered.filter((p) => { const titleIndex = p.Title?.toLowerCase().indexOf(filterQuery.toLowerCase()) const locationIndex = p.Location?.toLowerCase().indexOf(filterQuery.toLowerCase()) @@ -173,7 +172,6 @@ function ParkingFacilityBrowser({ // Decide if we want to show the parking let showParking = inFilter; - console.log('showParking', showParking) return showParking; }); diff --git a/src/components/parking/ParkingEditCapaciteit.tsx b/src/components/parking/ParkingEditCapaciteit.tsx index a7c51c2..56337ac 100644 --- a/src/components/parking/ParkingEditCapaciteit.tsx +++ b/src/components/parking/ParkingEditCapaciteit.tsx @@ -113,7 +113,7 @@ const getAllowedValueForFietstype = (fietstypeName: string, capacitydata: capaci const toggleActive = (fietsenstalling_secties: ParkingSections, fietstypeName: string, isActive: boolean): ParkingSections => { // It's mandatory to have at least 1 section - if (!fietsenstalling_secties[0]) return fietsenstalling_secties; + if (!fietsenstalling_secties || !fietsenstalling_secties[0]) return fietsenstalling_secties; if (!fietsenstalling_secties[0].secties_fietstype) return fietsenstalling_secties; let didUpdateSomething = false; diff --git a/src/pages/api/auth/[...nextauth].ts b/src/pages/api/auth/[...nextauth].ts index 8b4ef54..0955a3e 100644 --- a/src/pages/api/auth/[...nextauth].ts +++ b/src/pages/api/auth/[...nextauth].ts @@ -2,10 +2,10 @@ import { prisma } from "~/server/db"; import type { Provider } from "next-auth/providers"; import NextAuth from "next-auth"; -import { PrismaAdapter } from "@auth/prisma-adapter" +// import { PrismaAdapter } from "@auth/prisma-adapter" import type { NextAuthOptions, User } from "next-auth"; -import EmailProvider from "next-auth/providers/email" +// import EmailProvider from "next-auth/providers/email" import CredentialsProvider from "next-auth/providers/credentials"; @@ -44,31 +44,31 @@ providers.push( return user; }, }), - EmailProvider({ - name: "Magic link", - server: { - host: process.env.EMAIL_SERVER_HOST, - port: process.env.EMAIL_SERVER_PORT, - auth: { - user: process.env.EMAIL_SERVER_USER, - pass: process.env.EMAIL_SERVER_PASSWORD - } - }, - from: process.env.EMAIL_FROM, - maxAge: 60 * 60, // 1 hour - // sendVerificationRequest({ - // identifier: email, - // url, - // provider: { server, from } - // }) { - // /* your function */ - // } - }) + // EmailProvider({ + // name: "Magic link", + // server: { + // host: process.env.EMAIL_SERVER_HOST, + // port: process.env.EMAIL_SERVER_PORT, + // auth: { + // user: process.env.EMAIL_SERVER_USER, + // pass: process.env.EMAIL_SERVER_PASSWORD + // } + // }, + // from: process.env.EMAIL_FROM, + // maxAge: 60 * 60, // 1 hour + // // sendVerificationRequest({ + // // identifier: email, + // // url, + // // provider: { server, from } + // // }) { + // // /* your function */ + // // } + // }) ); export const authOptions: NextAuthOptions = { providers, - adapter: PrismaAdapter(prisma), + // adapter: PrismaAdapter(prisma), // https://next-auth.js.org/configuration/callbacks callbacks: { // augment jwt token with information that will be used on the server side diff --git a/src/pages/login.tsx b/src/pages/login.tsx index c3bd0d8..acc0da4 100644 --- a/src/pages/login.tsx +++ b/src/pages/login.tsx @@ -29,17 +29,17 @@ const Login: NextPage = () => { emailRef.current && emailRef.current.value !== '' && passwordRef.current && passwordRef.current.value !== '' ) { - console.log('signing in with magic link') - signIn("email", { - email: emailRef.current.value.trim(), - // password: passwordRef.current.value, - // callbackUrl: "/", - }); - // signIn("credentials", { + // console.log('signing in with magic link') + // signIn("email", { // email: emailRef.current.value.trim(), - // password: passwordRef.current.value, - // callbackUrl: "/", + // // password: passwordRef.current.value, + // // callbackUrl: "/", // }); + signIn("credentials", { + email: emailRef.current.value.trim(), + password: passwordRef.current.value, + callbackUrl: "/", + }); } else { alert('no email of password given'); } diff --git a/src/store/mapSlice.ts b/src/store/mapSlice.ts index 868dd93..6d2bb90 100644 --- a/src/store/mapSlice.ts +++ b/src/store/mapSlice.ts @@ -61,7 +61,7 @@ export const mapSlice = createSlice({ }, // Set activeParkingId setActiveParkingId(state, action) { - console.log('setActiveParkingId', action.payload); + // console.log('setActiveParkingId', action.payload); state.activeParkingId = action.payload; }, // setActiveMunicipality