refactoring: actions moved to seprate dir

This commit is contained in:
2024-01-09 15:00:26 +01:00
parent af7d42891c
commit 8112c9765d
13 changed files with 56 additions and 58 deletions

View File

@@ -1,5 +1,5 @@
import { deleteBillById } from '@/app/lib/billActions';
import { deleteLocationById } from '@/app/lib/locationActions';
import { deleteBillById } from '@/app/lib/actions/billActions';
import { deleteLocationById } from '@/app/lib/actions/locationActions';
import { revalidatePath } from 'next/cache';
import { notFound, redirect } from 'next/navigation';

View File

@@ -1,11 +1,11 @@
import { BillingLocation, Bill } from '@/app/lib/db-types';
import { fetchBillById } from '@/app/lib/billActions';
import { fetchBillById } from '@/app/lib/actions/billActions';
import clientPromise from '@/app/lib/mongodb';
import { BillEditForm } from '@/app/ui/BillEditForm';
import { ObjectId } from 'mongodb';
import { notFound } from 'next/navigation';
import { LocationEditForm } from '@/app/ui/LocationEditForm';
import { fetchLocationById } from '@/app/lib/locationActions';
import { fetchLocationById } from '@/app/lib/actions/locationActions';
export default async function Page({ params:{ id } }: { params: { id:string } }) {