From 8cb43f38b55e412a32f6cce5074083cf7e8e7f84 Mon Sep 17 00:00:00 2001 From: Oliver Sauter Date: Sat, 11 May 2024 21:47:32 +0200 Subject: [PATCH] fix expand/collapse buttons for highlights in the dashboard --- src/dashboard-refactor/search-results/index.tsx | 3 ++- src/dashboard-refactor/search-results/util.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dashboard-refactor/search-results/index.tsx b/src/dashboard-refactor/search-results/index.tsx index 33341cbf1d..bd666a3a05 100644 --- a/src/dashboard-refactor/search-results/index.tsx +++ b/src/dashboard-refactor/search-results/index.tsx @@ -581,7 +581,8 @@ export default class SearchResultsContainer extends React.Component< day: number, { onShareBtnClick }: PageInteractionProps, ) { - const shouldShow = areNotesShown || noteIds[notesType]?.length > 0 + const shouldShow = + areNotesShown === true && noteIds[notesType]?.length > 0 if (!shouldShow) { return null } diff --git a/src/dashboard-refactor/search-results/util.ts b/src/dashboard-refactor/search-results/util.ts index 0a97ab1891..2873eadf92 100644 --- a/src/dashboard-refactor/search-results/util.ts +++ b/src/dashboard-refactor/search-results/util.ts @@ -109,7 +109,7 @@ export const getInitialPageResultState = ( pageResultId, notesType: 'user', activePage: undefined, - areNotesShown: false, + areNotesShown: true, isTagPickerShown: false, isShareMenuShown: false, isCopyPasterShown: false,