Skip to content

Commit

Permalink
fix: add no photo for fixing error
Browse files Browse the repository at this point in the history
  • Loading branch information
matinst committed Sep 30, 2024
1 parent 9b5b42a commit a4a7258
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
4 changes: 2 additions & 2 deletions components/Home/Main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ export default function MainComponent() {
{!currenLoading && (
<section className="grid md:grid-cols-2 lg:w-2/3 lg:mx-auto bg-white shadow-lg rounded-md p-2 lg:grid-cols-4 2xl:grid-cols-5 sm:grid-cols-3 grid-cols-3">
{books.map((value, index) => {
const modifiedImageSource = value.imageSource.replace('https://bookito-data-storage.storage.iran.liara.space/images/', 'https://boookito.storage.ir/');
return (
<SingleRowBook
key={value.id}
imageSource={value.imageSource}
imageSource={'/images/nophoto.png'}
bookId={value.id}
categoryName={value.subCategory.category.categoryName}
bookName={value.bookName}
publisherName={value.publisherName}
seen={value.seen}
/>
);
})}
Expand Down
10 changes: 0 additions & 10 deletions components/Home/SingleRowBook.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,6 @@ export default function SingleRowBook(props) {
</div>
<div className="flex-auto justify-evenly">
<div className="flex flex-wrap ">
<div className="w-full flex-none text-sm flex items-center text-gray-600">
<GrFormView size={20} />
<span className="text-gray-400 whitespace-nowrap mr-3">
+
{props.seen == 0
? Pn.convertEnToPe(Math.floor(Math.random() * 42))
: Pn.convertEnToPe(props.seen)}
K
</span>
</div>
<div className="flex items-center w-full justify-between min-w-0 my-1 ">
<Link
href={{ pathname: "/book/[id]" }}
Expand Down
Binary file added public/images/nophoto.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion services/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export async function last_search(
pageId,
categoryId,
});
console.log({result})

return result.data.hits;
return result.data;
}

0 comments on commit a4a7258

Please sign in to comment.