Fix ESLint import paths and Next.js 15 params type for leads page
This commit is contained in:
+4
-4
@@ -1,10 +1,10 @@
|
|||||||
import { defineConfig, globalIgnores } from "eslint/config";
|
import { defineConfig, globalIgnores } from "eslint/config";
|
||||||
import nextVitals from "eslint-config-next/core-web-vitals";
|
import nextVitals from "eslint-config-next/core-web-vitals.js";
|
||||||
import nextTs from "eslint-config-next/typescript";
|
import nextTs from "eslint-config-next/typescript.js";
|
||||||
|
|
||||||
const eslintConfig = defineConfig([
|
const eslintConfig = defineConfig([
|
||||||
...nextVitals,
|
nextVitals,
|
||||||
...nextTs,
|
nextTs,
|
||||||
// Override default ignores of eslint-config-next.
|
// Override default ignores of eslint-config-next.
|
||||||
globalIgnores([
|
globalIgnores([
|
||||||
// Default ignores of eslint-config-next:
|
// Default ignores of eslint-config-next:
|
||||||
|
|||||||
@@ -17,10 +17,12 @@ import {
|
|||||||
} from "@/components/ui/select"
|
} from "@/components/ui/select"
|
||||||
import { getLeadById } from "@/data/leads"
|
import { getLeadById } from "@/data/leads"
|
||||||
import { getNotesByLeadId } from "@/data/notes"
|
import { getNotesByLeadId } from "@/data/notes"
|
||||||
|
import { use } from "react"
|
||||||
import { ArrowLeft, Edit, ExternalLink } from "lucide-react"
|
import { ArrowLeft, Edit, ExternalLink } from "lucide-react"
|
||||||
|
|
||||||
export default function LeadDetailsPage({ params }: { params: { id: string } }) {
|
export default function LeadDetailsPage({ params }: { params: Promise<{ id: string }> }) {
|
||||||
const lead = getLeadById(params.id)
|
const { id } = use(params)
|
||||||
|
const lead = getLeadById(id)
|
||||||
const leadNotes = lead ? getNotesByLeadId(lead.id) : []
|
const leadNotes = lead ? getNotesByLeadId(lead.id) : []
|
||||||
|
|
||||||
if (!lead) {
|
if (!lead) {
|
||||||
|
|||||||
Reference in New Issue
Block a user