fixing typescript errors
This commit is contained in:
@@ -1,9 +1,8 @@
|
|||||||
import { fetchLocationById } from '@/app/lib/actions/locationActions';
|
import { fetchLocationById } from '@/app/lib/actions/locationActions';
|
||||||
import type { NextApiRequest } from 'next'
|
|
||||||
import { NextResponse } from 'next/server';
|
import { NextResponse } from 'next/server';
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: NextApiRequest,
|
req: Request,
|
||||||
) => {
|
) => {
|
||||||
const url = new URL(req.url as string);
|
const url = new URL(req.url as string);
|
||||||
const locationId = url.searchParams.get('id');
|
const locationId = url.searchParams.get('id');
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import { fetchAllLocations } from '@/app/lib/actions/locationActions';
|
import { fetchAllLocations } from '@/app/lib/actions/locationActions';
|
||||||
import type { NextApiRequest } from 'next'
|
|
||||||
import { NextResponse } from 'next/server';
|
import { NextResponse } from 'next/server';
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: NextApiRequest,
|
req: Request,
|
||||||
) => {
|
) => {
|
||||||
// get year from query params
|
// get year from query params
|
||||||
const url = new URL(req.url as string);
|
const url = new URL(req.url as string);
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
import { LocationEditForm } from '@/app/ui/LocationEditForm';
|
import { LocationEditForm } from '@/app/ui/LocationEditForm';
|
||||||
import { YearMonth } from '@/app/lib/db-types';
|
import { YearMonth } from '@/app/lib/db-types';
|
||||||
|
|
||||||
export default async function LocationAddPage({ yearMonth }: { yearMonth:YearMonth }) {
|
export default function LocationAddPage({ yearMonth }: { yearMonth:YearMonth }) {
|
||||||
return (<LocationEditForm yearMonth={yearMonth} />);
|
return (<LocationEditForm yearMonth={yearMonth} />);
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,7 @@ export const MonthCard:FC<MonthCardProps> = ({ yearMonth, children, monthlyExpen
|
|||||||
// if the element i selected > scroll it into view
|
// if the element i selected > scroll it into view
|
||||||
elRef.current.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
elRef.current.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||||
}
|
}
|
||||||
}, []);
|
}, [expanded]);
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<div className="collapse collapse-plus bg-base-200 my-1" ref={elRef}>
|
<div className="collapse collapse-plus bg-base-200 my-1" ref={elRef}>
|
||||||
|
|||||||
Reference in New Issue
Block a user