diff --git a/app/api/locations/by-id/route.ts b/app/api/locations/by-id/route.ts
index 605b5d6..0696906 100644
--- a/app/api/locations/by-id/route.ts
+++ b/app/api/locations/by-id/route.ts
@@ -1,9 +1,8 @@
import { fetchLocationById } from '@/app/lib/actions/locationActions';
-import type { NextApiRequest } from 'next'
import { NextResponse } from 'next/server';
export const GET = async (
- req: NextApiRequest,
+ req: Request,
) => {
const url = new URL(req.url as string);
const locationId = url.searchParams.get('id');
diff --git a/app/api/locations/in-year/route.ts b/app/api/locations/in-year/route.ts
index 21179d9..3a68065 100644
--- a/app/api/locations/in-year/route.ts
+++ b/app/api/locations/in-year/route.ts
@@ -1,9 +1,8 @@
import { fetchAllLocations } from '@/app/lib/actions/locationActions';
-import type { NextApiRequest } from 'next'
import { NextResponse } from 'next/server';
export const GET = async (
- req: NextApiRequest,
+ req: Request,
) => {
// get year from query params
const url = new URL(req.url as string);
diff --git a/app/location/[id]/add/LocationAddPage.tsx b/app/location/[id]/add/LocationAddPage.tsx
index a099506..865f06f 100644
--- a/app/location/[id]/add/LocationAddPage.tsx
+++ b/app/location/[id]/add/LocationAddPage.tsx
@@ -3,6 +3,6 @@
import { LocationEditForm } from '@/app/ui/LocationEditForm';
import { YearMonth } from '@/app/lib/db-types';
-export default async function LocationAddPage({ yearMonth }: { yearMonth:YearMonth }) {
+export default function LocationAddPage({ yearMonth }: { yearMonth:YearMonth }) {
return ();
}
\ No newline at end of file
diff --git a/app/ui/MonthCard.tsx b/app/ui/MonthCard.tsx
index d9a3829..3861fb2 100644
--- a/app/ui/MonthCard.tsx
+++ b/app/ui/MonthCard.tsx
@@ -27,7 +27,7 @@ export const MonthCard:FC = ({ yearMonth, children, monthlyExpen
// if the element i selected > scroll it into view
elRef.current.scrollIntoView({ behavior: 'smooth', block: 'center' });
}
- }, []);
+ }, [expanded]);
return(