From f49ef5783e47e246d80a4dbba658c170b1a0e6ac Mon Sep 17 00:00:00 2001 From: evgenykatyshev Date: Thu, 19 Nov 2020 23:53:49 +0300 Subject: [PATCH] Marking destroyed monuments --- src/components/Sidebar/Sidebar.module.scss | 15 +++++++++++ src/components/Sidebar/index.tsx | 30 +++++++++++++++++----- 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/src/components/Sidebar/Sidebar.module.scss b/src/components/Sidebar/Sidebar.module.scss index 2d4deade..734c8c1b 100644 --- a/src/components/Sidebar/Sidebar.module.scss +++ b/src/components/Sidebar/Sidebar.module.scss @@ -45,6 +45,21 @@ line-height: 20px; } +.destroyed { + color: red; + font-weight: bold; + margin-bottom: 16px; + + svg { + margin: 0 0 -3px 0; + } + + span { + margin-left: 2px; + } + +} + .mainInfo { display: block; margin-block-start: 0; diff --git a/src/components/Sidebar/index.tsx b/src/components/Sidebar/index.tsx index 4e333690..fd8c1b8f 100644 --- a/src/components/Sidebar/index.tsx +++ b/src/components/Sidebar/index.tsx @@ -24,12 +24,14 @@ interface SidebarPropsInterface { } interface InfoInterface { + knid: string; + type: Type; + status?: string; + precise?: string; year: string; description: string; author: string; protection?: 'Ф' | 'Р' | 'М' | 'В'; - type: Type; - knid: string; knid_new?: string; style?: string; wiki?: string; @@ -108,10 +110,6 @@ const Sidebar = () => {

{info.year}

)} - {info?.description && ( -

{info?.description}

- )} - {info?.style && (

Стиль: {info?.style}

)} @@ -120,6 +118,25 @@ const Sidebar = () => {

{info?.author}

)} + {(info?.description || info?.status === 'destroyed') && ( +

+ {info?.status === 'destroyed' && ( + + + + + + Утрачен{info?.description ? '. ' : ''} + + )} + + {info?.description && ( + {info?.description} + )} +

+ + )} + {status && (
@@ -140,7 +157,6 @@ const Sidebar = () => { -
{address}
)}