Added demo text and fixed type issue on PropertyData

This commit is contained in:
Khalim Conn-Kowlessar 2023-05-30 16:57:49 +01:00
parent beaf00af42
commit b07f48c40f
4 changed files with 17 additions and 6 deletions

View file

@ -84,7 +84,10 @@ export default function PartModal({
>
{title}
</Dialog.Title>
<div className="flex justify-center"></div>
<div className="flex justify-center">
Ability to update propery details has been removed for the
demo
</div>
<div className="mt-4 flex justify-end gap-2">
<button

View file

@ -1,4 +1,3 @@
import { Dialog } from "@headlessui/react";
import { PencilSquareIcon } from "@heroicons/react/24/outline";
import { useState } from "react";
import PartModal from "./PartModal";

View file

@ -1,10 +1,9 @@
"use client";
import { useState } from "react";
import { Dialog } from "@headlessui/react";
import Link from "next/link";
import { ArrowLeftIcon, PencilSquareIcon } from "@heroicons/react/24/outline";
import { SearchData, EpcRating } from "@/types/epc";
import { SearchData, EpcRating, EpcKey } from "@/types/epc";
import { useRouter } from "next/navigation";
import { useQuery } from "@tanstack/react-query";
import EditEpcTargetModal from "../../../../components/property/EditEpcTargetModal";
@ -20,7 +19,16 @@ const EpcDefaults: { [key in EpcRating]: EpcRating } = {
A: "A",
};
const partConfig = [
type PartConfig = {
title: string;
descriptionData: {
key: EpcKey;
prefix: string;
suffix: string;
}[];
}[];
const partConfig: PartConfig = [
{
title: "General",
descriptionData: [

View file

@ -103,5 +103,6 @@ interface EpcDataProps {
}
type EpcRating = SearchResult["current-energy-rating"];
type EpcKey = keyof SearchResult;
export type { SearchData, SearchResult, EpcDataProps, EpcRating };
export type { SearchData, SearchResult, EpcDataProps, EpcRating, EpcKey };