From 86c535d27bd9b8dc28a5f8a72b66b08e408a7582 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 20 Jun 2022 16:04:43 +0100 Subject: [PATCH] switch to a const for defaultCopyProps --- .../frontend/building/data-containers/category-view-props.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-containers/category-view-props.ts b/app/src/frontend/building/data-containers/category-view-props.ts index f8d3d256..c80504b3 100644 --- a/app/src/frontend/building/data-containers/category-view-props.ts +++ b/app/src/frontend/building/data-containers/category-view-props.ts @@ -19,12 +19,14 @@ function initCopyProps(options?: Partial): CopyProps { }; } +const defaultCopyProps: CopyProps = initCopyProps(); + interface CategoryViewProps { intro: string; building: Building; mode: 'view' | 'edit' | 'multi-edit'; edited: boolean; - copy: CopyProps; + copy: defaultCopyProps; onChange: (key: string, value: any) => void; onVerify: (slug: string, verify: boolean, x: number, y: number) => void;