From 480845e67ae138f19c2f29ec7ebca32db2c2798d Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 27 Feb 2024 10:04:39 +0100 Subject: [PATCH] Fix visuals --- next/backend/graphql/index.ts | 2 +- .../SearchPageNew/useQueryBySearchOption.ts | 2 +- .../RegulationsListSection.tsx | 52 +++++++++---------- .../pages/RegulationPageContent.tsx | 2 +- next/messages/sk.json | 2 +- 5 files changed, 29 insertions(+), 31 deletions(-) diff --git a/next/backend/graphql/index.ts b/next/backend/graphql/index.ts index 492a15954..e45f75a19 100644 --- a/next/backend/graphql/index.ts +++ b/next/backend/graphql/index.ts @@ -14025,7 +14025,7 @@ export const AllRegulationsDocument = gql` ` export const RegulationsStaticPathsDocument = gql` query RegulationsStaticPaths { - regulations(sort: "publishedAt:desc", pagination: { limit: -1 }) { + regulations(sort: "updatedAt:desc", pagination: { limit: 30 }) { data { id attributes { diff --git a/next/components/molecules/SearchPageNew/useQueryBySearchOption.ts b/next/components/molecules/SearchPageNew/useQueryBySearchOption.ts index 023ec1a96..92fe9c6ad 100644 --- a/next/components/molecules/SearchPageNew/useQueryBySearchOption.ts +++ b/next/components/molecules/SearchPageNew/useQueryBySearchOption.ts @@ -162,7 +162,7 @@ export const useQueryBySearchOption = (optionKey: SearchOption['id'], filters: S title: `VZN ${regulation.regNumber} ${regulation.titleText ?? ''}`, linkHref: `/vzn/${regulation.slug}`, metadata: [categoryDisplayName, effectivityMessage], - customIconName: `regulation_${regulation.category}` ?? 'search_result_official_board', + customIconName: `regulation_${regulation.category ?? 'ostatne'}`, } }) ?? [] diff --git a/next/components/molecules/sections/general/RegulationsListSection/RegulationsListSection.tsx b/next/components/molecules/sections/general/RegulationsListSection/RegulationsListSection.tsx index 386d57702..a73ae44d5 100644 --- a/next/components/molecules/sections/general/RegulationsListSection/RegulationsListSection.tsx +++ b/next/components/molecules/sections/general/RegulationsListSection/RegulationsListSection.tsx @@ -78,35 +78,33 @@ const RegulationsListSection = ({ section }: RegulationsListSectionProps) => { }, [searchFilters.page, searchFilters.pageSize]) return ( - -
- {t('searching')} -
- -
- {resultsCount > 0 ? ( - - {t('SearchPage.showingResults', { - count: resultsCount, - })} - - ) : null} - + {t('searching')} +
+
- + {resultsCount > 0 ? ( + + {t('SearchPage.showingResults', { + count: resultsCount, + })} + + ) : null} + +
) } diff --git a/next/components/pages/RegulationPageContent.tsx b/next/components/pages/RegulationPageContent.tsx index 01a9cd85f..e67af3667 100644 --- a/next/components/pages/RegulationPageContent.tsx +++ b/next/components/pages/RegulationPageContent.tsx @@ -58,7 +58,7 @@ const RegulationPageContent = ({ regulation }: RegulationPageContentProps) => { <> diff --git a/next/messages/sk.json b/next/messages/sk.json index f8717f4a7..fb5c428ec 100644 --- a/next/messages/sk.json +++ b/next/messages/sk.json @@ -290,7 +290,7 @@ "amendments": "Dodatky", "noAmendmentsMessage": "K tomuto VZN neexistujú dodatky.", "influenceOnOtherRegulations": "Vplyv na iné VZN", - "thisRegulationAmends": "Toto VZN je dodatom k", + "thisRegulationAmends": "Toto VZN je dodatkom k", "thisRegulationDoesntAmend": "Toto VZN nie je dodatkom k žiadnemu VZN.", "thisRegulationCancells": "Toto VZN zrušuje", "thisRegulationDoesntCancell": "Toto VZN nezrušuje žiadne VZN.",