diff --git a/public/placeholders/placeholder-0.svg b/public/placeholders/placeholder-0.svg new file mode 100644 index 00000000..7e7d3bc5 --- /dev/null +++ b/public/placeholders/placeholder-0.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/placeholders/placeholder-1.svg b/public/placeholders/placeholder-1.svg new file mode 100644 index 00000000..31bb3f19 --- /dev/null +++ b/public/placeholders/placeholder-1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/placeholders/placeholder-10.svg b/public/placeholders/placeholder-10.svg new file mode 100644 index 00000000..fab8ee94 --- /dev/null +++ b/public/placeholders/placeholder-10.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/placeholders/placeholder-11.svg b/public/placeholders/placeholder-11.svg new file mode 100644 index 00000000..0e227890 --- /dev/null +++ b/public/placeholders/placeholder-11.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/placeholders/placeholder-12.svg b/public/placeholders/placeholder-12.svg new file mode 100644 index 00000000..970dfe60 --- /dev/null +++ b/public/placeholders/placeholder-12.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/placeholders/placeholder-13.svg b/public/placeholders/placeholder-13.svg new file mode 100644 index 00000000..b42e995e --- /dev/null +++ b/public/placeholders/placeholder-13.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/placeholders/placeholder-14.svg b/public/placeholders/placeholder-14.svg new file mode 100644 index 00000000..d5005b04 --- /dev/null +++ b/public/placeholders/placeholder-14.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/placeholders/placeholder-2.svg b/public/placeholders/placeholder-2.svg new file mode 100644 index 00000000..5b3a7f0f --- /dev/null +++ b/public/placeholders/placeholder-2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/placeholders/placeholder-3.svg b/public/placeholders/placeholder-3.svg new file mode 100644 index 00000000..a0372e88 --- /dev/null +++ b/public/placeholders/placeholder-3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/placeholders/placeholder-4.svg b/public/placeholders/placeholder-4.svg new file mode 100644 index 00000000..802e5346 --- /dev/null +++ b/public/placeholders/placeholder-4.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/placeholders/placeholder-5.svg b/public/placeholders/placeholder-5.svg new file mode 100644 index 00000000..24f00a5a --- /dev/null +++ b/public/placeholders/placeholder-5.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/placeholders/placeholder-6.svg b/public/placeholders/placeholder-6.svg new file mode 100644 index 00000000..72d645ac --- /dev/null +++ b/public/placeholders/placeholder-6.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/placeholders/placeholder-7.svg b/public/placeholders/placeholder-7.svg new file mode 100644 index 00000000..21a329ec --- /dev/null +++ b/public/placeholders/placeholder-7.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/placeholders/placeholder-8.svg b/public/placeholders/placeholder-8.svg new file mode 100644 index 00000000..97442693 --- /dev/null +++ b/public/placeholders/placeholder-8.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/placeholders/placeholder-9.svg b/public/placeholders/placeholder-9.svg new file mode 100644 index 00000000..28c10fbc --- /dev/null +++ b/public/placeholders/placeholder-9.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/modules/browse/components/ShelfBrowse/index.js b/src/modules/browse/components/ShelfBrowse/index.js index 9c7334a1..a5ec6599 100644 --- a/src/modules/browse/components/ShelfBrowse/index.js +++ b/src/modules/browse/components/ShelfBrowse/index.js @@ -51,6 +51,7 @@ const ShelfBrowse = () => { const fetchShelfData = useCallback(async () => { setShelfData('loading'); try { + // `https://browse.workshop.search.lib.umich.edu/carousel?query=${callNumber}` const response = await fetch(`https://search.lib.umich.edu/catalog/browse/carousel?query=${callNumber}`); if (!response.ok) { throw new Error(`HTTP Error! status: ${response.status}`); diff --git a/src/modules/browse/components/ShelfBrowseCarousel/index.js b/src/modules/browse/components/ShelfBrowseCarousel/index.js index 1a3cf1d4..5c76bd9a 100644 --- a/src/modules/browse/components/ShelfBrowseCarousel/index.js +++ b/src/modules/browse/components/ShelfBrowseCarousel/index.js @@ -1,7 +1,20 @@ import './styles.css'; +/* Import { Anchor, Icon, ImagePlaceholder } from '../../../reusable'; */ import { Anchor, Icon } from '../../../reusable'; import React, { useEffect, useState } from 'react'; +/* +Const bookCover = (item) => { + let url = 'https://www.syndetics.com/index.php?client=umichaa&pagename=lc.jpg'; + ['isbn', 'issn', 'oclc'].forEach((parameter) => { + if (item[parameter]) { + url += `&${parameter}=${item[parameter]}`; + } + }); + return url; +}; +*/ + const ShelfBrowseCarousel = ({ callNumber, items, itemsPerPage, setButtonAction, setDisableButton, uid }) => { const currentItem = (item) => { return item.call_number === callNumber && item.url.endsWith(uid); @@ -104,14 +117,15 @@ const ShelfBrowseCarousel = ({ callNumber, items, itemsPerPage, setButtonAction, {currentItems.map((item, index) => { const isCurrentItem = currentItem(item); const firstOrLastItem = !isCurrentItem && ((firstPage && index === 0) || (lastPage && currentItems.length - 1 === index)); - const fields = firstOrLastItem ? ['call_number'] : Object.keys(item).slice(0, -1); + const fields = firstOrLastItem ? ['call_number'] : ['title', 'author', 'date', 'call_number']; const basePath = 'https://search.lib.umich.edu'; const anchorAttributes = firstOrLastItem ? { href: `${basePath}/catalog/browse/callnumber?query=${item.call_number}` } : { to: item.url.replace(basePath, '') + window.location.search }; + const trueIndex = (currentPage * currentItems.length) + index; return ( -