Added propertyMeta api call to recommendations

This commit is contained in:
Khalim Conn-Kowlessar 2023-08-02 18:24:28 +01:00
parent 89a8091103
commit fe86f9fe85
2 changed files with 7 additions and 19 deletions

View file

@ -116,7 +116,6 @@ export default async function PreAssessmentReport({
}: {
params: { slug: string; propertyId: string };
}) {
// TODO: Add main fuel!
const propertyMeta = await getPropertyMeta(params.propertyId);
const conditionReportData = await getConditionReport(params.propertyId);
const propertyDetailsSpatial = {

View file

@ -1,25 +1,14 @@
import { Recommendation } from "@/app/db/schema/recommendations";
import { PropertyMeta } from "@/app/db/schema/property";
import RecommendationContainer from "@/app/components/building-passport/RecommendationContainer";
import { getPropertyMeta } from "../utils";
export default async function Recommendations() {
const propertyMeta: PropertyMeta = {
id: 1,
address: "123 Fake Street",
postcode: "AB1 2CD",
hasPreConditionReport: true,
hasRecommendations: true,
createdAt: "2023-07-12 11:51:31.000 +0100",
propertyType: "House",
builtForm: "Detached",
localAuthority: "Birmingham",
constituency: "Birmingham",
numberOfRooms: 5,
yearBuilt: 1990,
tenure: "Rented (social)",
currentEpcRating: "C",
currentSapPoints: 78,
};
export default async function Recommendations({
params,
}: {
params: { slug: string; propertyId: string };
}) {
const propertyMeta = await getPropertyMeta(params.propertyId);
const recommendations: Recommendation = {
Walls: [