-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
search card gird and adding more mocks
- Loading branch information
Showing
7 changed files
with
101 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
export const mockSearchResponse = { | ||
keyword: "example", | ||
numResults: 4, | ||
page: 1, | ||
perPage: 48, | ||
results: [ | ||
{ | ||
uuid: "string", | ||
recordType: "collection | sub-collection | item", | ||
title: "string", | ||
imageID: "string | null", | ||
numberOfDigitizedItems: "number", | ||
containsOnSiteMaterial: "boolean", | ||
containsAVMaterial: "boolean", // keeping bc the logic exists and it's already there | ||
containsMultipleCaptures: "boolean", // used to determine whether or not an item should display the "multiple images" tag, | ||
contentType: "image | audio | video | pdf | null", // null | ||
highlights: { highlighted_field_name: ["string"] }, | ||
firstIndexed_dt: "date", | ||
}, | ||
{ | ||
uuid: "string", | ||
recordType: "collection | sub-collection | item", | ||
title: "string", | ||
imageID: "string | null", | ||
numberOfDigitizedItems: "number", | ||
containsOnSiteMaterial: "boolean", | ||
containsAVMaterial: "boolean", // keeping bc the logic exists and it's already there | ||
containsMultipleCaptures: "boolean", // used to determine whether or not an item should display the "multiple images" tag | ||
contentType: "image | audio | video | pdf | null", // null | ||
highlights: { highlighted_field_name: ["string"] }, | ||
firstIndexed_dt: "date", | ||
}, | ||
{ | ||
uuid: "string", | ||
recordType: "collection | sub-collection | item", | ||
title: "string", | ||
imageID: "string | null", | ||
numberOfDigitizedItems: "number", | ||
containsOnSiteMaterial: "boolean", | ||
containsAVMaterial: "boolean", // keeping bc the logic exists and it's already there | ||
containsMultipleCaptures: "boolean", // used to determine whether or not an item should display the "multiple images" tag | ||
contentType: "image | audio | video | pdf | null", // null | ||
highlights: { highlighted_field_name: ["string"] }, | ||
firstIndexed_dt: "date", | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { SearchCardModel } from "@/src/models/searchCard"; | ||
import SearchCard from "../card/searchCard"; | ||
import { SimpleGrid } from "@nypl/design-system-react-components"; | ||
|
||
const SearchCardsGrid = ({ results }) => { | ||
return ( | ||
<SimpleGrid columns={1} gap="grid.m"> | ||
{results?.map((result, index) => { | ||
const searchResult = new SearchCardModel(result); | ||
return <SearchCard key={index} result={searchResult} />; | ||
})} | ||
</SimpleGrid> | ||
); | ||
}; | ||
|
||
export default SearchCardsGrid; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters