mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-04-30 18:59:37 +00:00
Updated to latest Next.js and ESlint version
This commit is contained in:
parent
862816858c
commit
73dda49ece
11 changed files with 704 additions and 576 deletions
|
@ -5,7 +5,6 @@ import Link from 'next/link';
|
|||
|
||||
import { cn } from '@/lib/utils';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import Image from 'next/image';
|
||||
|
||||
const headingFont = localFont({ src: '../../public/fonts/font.woff2' });
|
||||
|
||||
|
|
|
@ -4,11 +4,10 @@ import { notFound, redirect } from 'next/navigation';
|
|||
import { db } from '@/lib/db';
|
||||
import { BoardNavbar } from './_components/board-navbar';
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: { boardId: string };
|
||||
export async function generateMetadata(props: {
|
||||
params: Promise<{ boardId: string }>;
|
||||
}) {
|
||||
const params = await props.params;
|
||||
const { orgId } = auth();
|
||||
|
||||
if (!orgId) return { title: 'Board' };
|
||||
|
@ -25,13 +24,14 @@ export async function generateMetadata({
|
|||
};
|
||||
}
|
||||
|
||||
const BoardIdLayout = async ({
|
||||
children,
|
||||
params,
|
||||
}: {
|
||||
const BoardIdLayout = async (props: {
|
||||
children: React.ReactNode;
|
||||
params: { boardId: string };
|
||||
params: Promise<{ boardId: string }>;
|
||||
}) => {
|
||||
const params = await props.params;
|
||||
|
||||
const { children } = props;
|
||||
|
||||
const { orgId } = auth();
|
||||
|
||||
if (!orgId) redirect('/select-org');
|
||||
|
|
|
@ -5,12 +5,13 @@ import { db } from '@/lib/db';
|
|||
import { ListContainer } from './_components/list-container';
|
||||
|
||||
interface BoardIdPageProps {
|
||||
params: {
|
||||
params: Promise<{
|
||||
boardId: string;
|
||||
};
|
||||
}>;
|
||||
}
|
||||
|
||||
const BoardIdPage = async ({ params }: BoardIdPageProps) => {
|
||||
const BoardIdPage = async (props: BoardIdPageProps) => {
|
||||
const params = await props.params;
|
||||
const { orgId } = auth();
|
||||
|
||||
if (!orgId) {
|
||||
|
|
|
@ -6,8 +6,9 @@ import { db } from '@/lib/db';
|
|||
|
||||
export async function GET(
|
||||
req: Request,
|
||||
{ params }: { params: { cardId: string } }
|
||||
props: { params: Promise<{ cardId: string }> }
|
||||
) {
|
||||
const params = await props.params;
|
||||
try {
|
||||
const { orgId, userId } = auth();
|
||||
|
||||
|
|
|
@ -5,8 +5,9 @@ import { db } from '@/lib/db';
|
|||
|
||||
export async function GET(
|
||||
req: Request,
|
||||
{ params }: { params: { cardId: string } }
|
||||
props: { params: Promise<{ cardId: string }> }
|
||||
) {
|
||||
const params = await props.params;
|
||||
try {
|
||||
const { orgId, userId } = auth();
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import { stripe } from '@/lib/stripe';
|
|||
|
||||
export async function POST(req: Request) {
|
||||
const body = await req.text();
|
||||
const signature = headers().get('Stripe-Signature') as string;
|
||||
const signature = (await headers()).get('Stripe-Signature') as string;
|
||||
|
||||
let event: Stripe.Event;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue