Loading results...
\n ) : results.length > 0 ? (\n <>\n- \n {/*\n For single-category, we do normal slicing by currentPage:\n if multiCategorySearch == false, we allow the user to page\n through the aggregated results.\n If multiCategorySearch == true, we are already fetching *only*\n the results for the relevant page, so we display them all.\n */}\n {multiCategorySearch\n ? results.map((item, idx) => (\n
- \n handleLinkClick(item.link)}\n className={`result-title ${\n visitedLinks.includes(item.link) ? \"visited-link\" : \"\"\n }`}\n >\n {item.title}\n \n \n \n Cache\n \n \n ))\n : // Single category: slice the aggregated array based on currentPage\n results\n .slice(\n window.innerWidth < 600\n ? 0\n : (currentPage - 1) * resultsPerPage,\n window.innerWidth < 600\n ? results.length\n : currentPage * resultsPerPage\n )\n .map((item, idx) => (\n
- \n handleLinkClick(item.link)}\n className={`result-title ${\n visitedLinks.includes(item.link) ? \"visited-link\" : \"\"\n }`}\n >\n {item.title}\n \n \n \n Cache\n \n \n ))}\n
No search results found.
\n )\n ) : videoLoading ? (\nLoading videos...
\n ) : videoResults && videoResults.length > 0 ? (\n- \n {videoResults.map((video, idx) => (\n
- \n \n {video.name}\n \n \n \n ))}\n
No video results found.
\n )}\n