Skip to content

Commit

Permalink
Fix visuals (#1190)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ty-ci authored Feb 27, 2024
1 parent 6287788 commit 61216c1
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 31 deletions.
2 changes: 1 addition & 1 deletion next/backend/graphql/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'}`,
}
}) ?? []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,35 +78,33 @@ const RegulationsListSection = ({ section }: RegulationsListSectionProps) => {
}, [searchFilters.page, searchFilters.pageSize])

return (
<SectionContainer className="mb-8">
<div className="flex w-full flex-col gap-y-8 pt-12">
<Typography type="h1">{t('searching')}</Typography>
<div className="flex flex-col gap-3 lg:gap-4">
<AdvancedSearchNew
ref={searchRef}
placeholder={t('enterKeyword')}
input={input}
setInput={setInput}
setSearchQuery={setSearchValue}
/>
</div>
{resultsCount > 0 ? (
<Typography type="p">
{t('SearchPage.showingResults', {
count: resultsCount,
})}
</Typography>
) : null}
<GeneralSearchResults
variant="specificResults"
searchOption={defaultSearchOption}
filters={searchFilters}
onSetResultsCount={setResultsCountById}
onPageChange={setCurrentPage}
key={`specificResults-${defaultSearchOption.id}`}
<div className="flex w-full flex-col gap-y-8">
<Typography type="h1">{t('searching')}</Typography>
<div className="flex flex-col gap-3 lg:gap-4">
<AdvancedSearchNew
ref={searchRef}
placeholder={t('enterKeyword')}
input={input}
setInput={setInput}
setSearchQuery={setSearchValue}
/>
</div>
</SectionContainer>
{resultsCount > 0 ? (
<Typography type="p">
{t('SearchPage.showingResults', {
count: resultsCount,
})}
</Typography>
) : null}
<GeneralSearchResults
variant="specificResults"
searchOption={defaultSearchOption}
filters={searchFilters}
onSetResultsCount={setResultsCountById}
onPageChange={setCurrentPage}
key={`specificResults-${defaultSearchOption.id}`}
/>
</div>
)
}

Expand Down
2 changes: 1 addition & 1 deletion next/components/pages/RegulationPageContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const RegulationPageContent = ({ regulation }: RegulationPageContentProps) => {
<>
<PageHeader
title={regulationShortTitle}
tag={regulation.attributes?.category}
tag={t(`category.${regulation.attributes?.category ?? 'ostatne'}`)}
subtext={regulation.attributes?.titleText}
breadcrumbs={breadcrumbs}
/>
Expand Down
2 changes: 1 addition & 1 deletion next/messages/sk.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down

0 comments on commit 61216c1

Please sign in to comment.