Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "asuntomyynti-react",
"version": "1.5.1",
"version": "1.5.2",
"private": true,
"homepage": ".",
"dependencies": {
Expand Down
11 changes: 6 additions & 5 deletions src/modules/search/SearchContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ const SearchContainer = () => {
const queryHeaders = { token: config?.token };

// Fetch results with current search query
const {
data: searchResults,
isFetching: isSearchQueryFetching,
isError: isSearchQueryError,
} = useSearchResults(query, queryHeaders, currentLang);
const { data: searchResults, isFetching: isSearchQueryFetching, isError: isSearchQueryError } = useSearchResults(
query,
queryHeaders,
currentLang
);

// Filter HITAS/HASO apartments by selected ownership type
const filteredSearchResults = filterProjectsByOwnershipType(searchResults ?? [], projectOwnershipType);
Expand Down Expand Up @@ -202,6 +202,7 @@ const SearchContainer = () => {
header={t('SEARCH:pre-marketing')}
searchResults={preMarketing}
currentLang={currentLang}
showUpcomingSalesLink
tooltipText={
projectOwnershipType.toLowerCase() === 'haso'
? t('SEARCH:haso-pre-marketing-apartments-tooltip')
Expand Down
4 changes: 3 additions & 1 deletion src/modules/search/components/result/list/ProjectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type Props = {
project: Project;
hideImgOnSmallScreen?: boolean;
showSubscribeButton?: boolean;
showUpcomingSalesLink?: boolean;
currentLang: string;
hideApartments?: boolean;
};
Expand All @@ -35,6 +36,7 @@ const ProjectCard = ({
project,
hideImgOnSmallScreen = false,
showSubscribeButton = false,
showUpcomingSalesLink = false,
currentLang,
hideApartments = false,
}: Props) => {
Expand Down Expand Up @@ -160,7 +162,7 @@ const ProjectCard = ({
</>
</Label>
</div>
{url && (
{showUpcomingSalesLink && url && (
<a href={`${fullURL(url)}#yksityiskohdat`} className={`${css.controlsButton} `}>
{t('SEARCH:subscribe-for-upcoming-sales')}
</a>
Expand Down
3 changes: 3 additions & 0 deletions src/modules/search/components/result/list/SearchResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type Props = {
header: string;
openMap?: () => void;
showSubscribeButton?: boolean;
showUpcomingSalesLink?: boolean;
currentLang: string;
resultCountByProjects?: boolean;
hideApartments?: boolean;
Expand All @@ -28,6 +29,7 @@ const SearchResults = ({
header,
openMap,
showSubscribeButton = false,
showUpcomingSalesLink = false,
currentLang,
resultCountByProjects = false,
hideApartments = false,
Expand Down Expand Up @@ -75,6 +77,7 @@ const SearchResults = ({
config={config}
project={x}
showSubscribeButton={showSubscribeButton}
showUpcomingSalesLink={showUpcomingSalesLink}
currentLang={currentLang}
hideApartments={hideApartments}
/>
Expand Down