PATH:
home
/
letacommog
/
morandas1
/
wp-content
/
plugins
/
envato-elements
/
src
/
js
/
react
/
components
import React, { Component } from "react" import ReactPaginate from "react-paginate" import PropTypes from "prop-types" import styles from "./LibraryResultsLayout.module.css" export default class LibraryResultsLayout extends Component { constructor(props) { super(props) this.state = {} } render() { const { layoutOptions, resultsClassName, resultsList, openItem, searchQuery, ResultNode, updateSingleItem, searchChange, apiData, } = this.props return ( <React.Fragment> <div className={`${styles.results} ${ layoutOptions.display === "square" ? styles.resultsSquare : "" } ${resultsClassName || ""}`} data-cy="results"> {resultsList.length > 0 ? ( resultsList.map((result) => { let thisOpenItem = null if (openItem) { if (typeof openItem.collectionId !== "undefined") { thisOpenItem = openItem.collectionId === result.collectionId ? openItem : null } if (typeof openItem.photoId !== "undefined") { thisOpenItem = openItem.photoId === result.photoId ? openItem : null } if (typeof openItem.blockGroup !== "undefined") { thisOpenItem = openItem.blockGroup === result.slug ? openItem : null } } return <ResultNode {...this.props} result={result} key={result.uuid} openItem={thisOpenItem} /> }) ) : ( <div className={styles.noResults}>Sorry no results found.</div> )} </div> {apiData.page_number && apiData.total_results && apiData.per_page && apiData.total_results > apiData.per_page ? ( <ReactPaginate previousLabel="Previous" nextLabel="Next" breakLabel="..." breakClassName="break-me" pageCount={Math.ceil(apiData.total_results / apiData.per_page)} marginPagesDisplayed={2} pageRangeDisplayed={5} forcePage={parseInt(apiData.page_number, 10) - 1} onPageChange={(data) => { window.scrollTo(0, 0) const dialogContent = jQuery(".dialog-widget-content") if (dialogContent.length > 0) { dialogContent.get(0).scrollTop = 0 } searchChange("pg", data.selected + 1) }} containerClassName={styles.pagination} pageClassName={styles.paginationItem} pageLinkClassName={styles.paginationLink} activeClassName={styles.paginationActive} disabledClassName={styles.paginationDisabled} /> ) : null} </React.Fragment> ) } } LibraryResultsLayout.propTypes = {}
[+]
..
[+]
LibraryResultsElementor
[-] LibrarySearchElementor.jsx
[edit]
[-] LibraryResultsLayout.module.css
[edit]
[-] Photos.jsx
[edit]
[-] LibraryResultsElementorBlocks.module.css
[edit]
[-] ElementorBlocks.module.css
[edit]
[-] LibrarySearchBeaverBuilder.jsx
[edit]
[-] LibraryHeader.module.css
[edit]
[-] BeaverBuilder.jsx
[edit]
[-] LibrarySearchElementorFilters.jsx
[edit]
[-] Global.jsx
[edit]
[-] LibraryResultsElementorLayout.jsx
[edit]
[-] LoadingSpinner.jsx
[edit]
[-] LibraryResultsPhotos.jsx
[edit]
[-] LibraryResultsBeaverBuilder.module.css
[edit]
[-] Settings.module.css
[edit]
[-] ElementorBlocks.jsx
[edit]
[-] Importer.jsx
[edit]
[-] LibraryResultsElementorBlocks.jsx
[edit]
[-] LibrarySearch.module.css
[edit]
[-] LibraryResultsBeaverBuilder.jsx
[edit]
[-] LicenseButton.jsx
[edit]
[-] LibraryResults.jsx
[edit]
[-] Importer.module.css
[edit]
[-] Settings.jsx
[edit]
[-] Inserter.jsx
[edit]
[-] LibraryResultsLayout.jsx
[edit]
[-] Elementor.module.css
[edit]
[-] Photos.module.css
[edit]
[-] ProjectName.jsx
[edit]
[-] LoadingSpinner.module.css
[edit]
[-] LibrarySearchElementorBlocks.jsx
[edit]
[-] LibraryHeader.jsx
[edit]
[-] Inserter.module.css
[edit]
[-] ProjectName.module.css
[edit]
[-] LibrarySearchPhotos.jsx
[edit]
[-] Global.module.css
[edit]
[-] Header.jsx
[edit]
[-] LibraryResultsRows.module.css
[edit]
[-] Home.jsx
[edit]
[-] Elementor.jsx
[edit]
[-] LibrarySearch.jsx
[edit]
[-] LibraryResults.module.css
[edit]
[-] LibraryResultsRows.jsx
[edit]
[-] LibraryResultsPhotos.module.css
[edit]
[-] Header.module.css
[edit]
[-] LicenseButton.module.css
[edit]