diff --git a/frontend/.lighthouserc.json b/frontend/.lighthouserc.json index d56d1f30..0a4c5b99 100644 --- a/frontend/.lighthouserc.json +++ b/frontend/.lighthouserc.json @@ -2,7 +2,11 @@ "ci": { "collect": { "numberOfRuns": 1, - "url": ["http://localhost:3000/", "http://localhost:3000/verify"] + "url": [ + "http://localhost:3000/", + "http://localhost:3000/verify", + "http://localhost:3000/map" + ] }, "assert": { "assertions": { diff --git a/frontend/components/map/ParcelSidebar.tsx b/frontend/components/map/ParcelSidebar.tsx index 8c623b20..f884582d 100644 --- a/frontend/components/map/ParcelSidebar.tsx +++ b/frontend/components/map/ParcelSidebar.tsx @@ -1,25 +1,12 @@ "use client"; import React, { useEffect, useRef } from "react"; +import type { DocumentStatus, ParcelDocument } from "@/types/parcel"; -// ───────────────────────────────────────────── -// Types -// ───────────────────────────────────────────── -export type DocumentStatus = "VERIFIED" | "PENDING" | "FLAGGED" | "REJECTED"; - -export interface ParcelDocument { - id: string; - name: string; - status: DocumentStatus; - /** 0–100 */ - riskScore: number; - ownerName: string | null; - isOwnedByViewer: boolean; - stellarAnchorDate: string | null; - stellarTxHash: string | null; - flags: string[]; - detailsUrl: string; -} +// Re-exported for backward compatibility with any existing imports of +// these types from this component file; the canonical definitions now +// live in @/types/parcel. +export type { DocumentStatus, ParcelDocument }; interface ParcelSidebarProps { document: ParcelDocument | null; diff --git a/frontend/next.config.ts.bak b/frontend/next.config.ts.bak deleted file mode 100644 index 0c05faf8..00000000 --- a/frontend/next.config.ts.bak +++ /dev/null @@ -1,17 +0,0 @@ -import type { NextConfig } from "next"; -import createNextIntlPlugin from "next-intl/plugin"; - -const withNextIntl = createNextIntlPlugin("./i18n/request.ts"); - -const nextConfig: NextConfig = { - /* config options here */ - webpack: (config) => { - config.resolve.alias = { - ...config.resolve.alias, - canvas: false, - }; - return config; - }, -}; - -export default withNextIntl(nextConfig); diff --git a/frontend/types/parcel.ts b/frontend/types/parcel.ts new file mode 100644 index 00000000..d274285f --- /dev/null +++ b/frontend/types/parcel.ts @@ -0,0 +1,20 @@ +/** + * Shared shape for a parcel/document as consumed by the map sidebar + * (ParcelSidebar). Lives here so future consumers import this instead of + * duplicating the shape inline. + */ +export type DocumentStatus = "VERIFIED" | "PENDING" | "FLAGGED" | "REJECTED"; + +export interface ParcelDocument { + id: string; + name: string; + status: DocumentStatus; + /** 0–100 */ + riskScore: number; + ownerName: string | null; + isOwnedByViewer: boolean; + stellarAnchorDate: string | null; + stellarTxHash: string | null; + flags: string[]; + detailsUrl: string; +}