Commit 8cfe3146 by Arjun Jhukal

updated teh checkout props to fix build

parent c3407cce
import prettier from 'eslint-plugin-prettier'; // import prettier from 'eslint-plugin-prettier';
import typescriptEslint from '@typescript-eslint/eslint-plugin'; import typescriptEslint from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser'; import tsParser from '@typescript-eslint/parser';
import js from '@eslint/js'; import js from '@eslint/js';
...@@ -22,7 +22,7 @@ const eslintConfig = [ ...@@ -22,7 +22,7 @@ const eslintConfig = [
}, },
{ {
plugins: { plugins: {
prettier, // prettier,
'@typescript-eslint': typescriptEslint '@typescript-eslint': typescriptEslint
}, },
languageOptions: { languageOptions: {
...@@ -86,18 +86,18 @@ const eslintConfig = [ ...@@ -86,18 +86,18 @@ const eslintConfig = [
} }
], ],
'prettier/prettier': [ // 'prettier/prettier': [
'warn', // 'warn',
{ // {
bracketSpacing: true, // bracketSpacing: true,
printWidth: 140, // printWidth: 140,
singleQuote: true, // singleQuote: true,
trailingComma: 'none', // trailingComma: 'none',
tabWidth: 2, // tabWidth: 2,
useTabs: false, // useTabs: false,
endOfLine: "lf" // endOfLine: "lf"
} // }
] // ]
} }
} }
]; ];
......
...@@ -5,20 +5,17 @@ import { Box, Button } from '@mui/material'; ...@@ -5,20 +5,17 @@ import { Box, Button } from '@mui/material';
import Image from 'next/image'; import Image from 'next/image';
import React from 'react' import React from 'react'
interface Props {
searchParams: { amount?: string; bonus?: string };
params: { slug: string };
}
export default async function CheckoutPage({ export default async function CheckoutPage({
params, params,
searchParams, searchParams,
}: { }: {
params: { slug: string }; params: Promise<{ slug: string }>;
searchParams: { amount?: string; bonus?: string }; searchParams: { amount?: string; bonus?: string };
}) { }) {
const amount = searchParams.amount ? Number(searchParams.amount) : 0; const amount = searchParams.amount ? Number(searchParams.amount) : 0;
const bonus = searchParams.bonus ? Number(searchParams.bonus) : 0; const bonus = searchParams.bonus ? Number(searchParams.bonus) : 0;
const slug = params.slug; const { slug } = await params;
return ( return (
<section className="checkout__root"> <section className="checkout__root">
<div className="grid grid-cols-12 gap-4 lg:gap-10 xl:gap-12"> <div className="grid grid-cols-12 gap-4 lg:gap-10 xl:gap-12">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment