Skip to content

Commit

Permalink
Merge pull request #224 from aodn/feature/6038-full-list-and-detail-view
Browse files Browse the repository at this point in the history
✨ implement full list view and fetch more
  • Loading branch information
utas-raymondng authored Nov 21, 2024
2 parents 325fc14 + d5126d4 commit 962e3ae
Show file tree
Hide file tree
Showing 7 changed files with 327 additions and 216 deletions.
3 changes: 2 additions & 1 deletion src/components/common/store/searchReducer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ interface ObjectValue {
collectionsQueryResult: CollectionsQueryType;
parameterVocabsResult: Array<Vocab>;
}
export const DEFAULT_SEARCH_PAGE = 11;
export const DEFAULT_SEARCH_PAGE_SIZE = 11;
export const FULL_LIST_PAGE_SIZE = 21;

const DEFAULT_SEARCH_SCORE = import.meta.env.VITE_ELASTIC_RELEVANCE_SCORE;

Expand Down
3 changes: 2 additions & 1 deletion src/components/result/ListResultCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const ListResultCard: FC<ListResultCardProps> = ({
onClickLinks = () => {},
onClickDownload = () => {},
selectedUuid,
sx,
}) => {
const [showButtons, setShowButtons] = useState<boolean>(false);

Expand All @@ -40,7 +41,6 @@ const ListResultCard: FC<ListResultCardProps> = ({

const isSelectedDataset = uuid === selectedUuid;

// TODO: buttons are changed, but the behaviors are fake / wrong
return (
<Card
id={`result-card-${uuid}`}
Expand All @@ -58,6 +58,7 @@ const ListResultCard: FC<ListResultCardProps> = ({
borderRadius: borderRadius.small,
paddingX: padding.medium,
paddingY: padding.small,
...sx,
}}
onMouseEnter={() => setShowButtons(true)}
onMouseLeave={() => setShowButtons(false)}
Expand Down
Loading

0 comments on commit 962e3ae

Please sign in to comment.