import React, {useEffect, useState} from 'react'; import theme from '../theme.jsx'; import ReactGA from 'react-ga4'; import {Link} from 'react-router-dom'; import { removeQuery } from '../components/ScrollToTop.jsx'; import SearchContactForm from '../components/SearchContactForm.jsx'; import { Search as SearchIcon, CloudQueue as CloudQueueIcon, Code as CodeIcon, Close as CloseIcon, Folder as FolderIcon, LibraryBooks as LibraryBooksIcon } from '@mui/icons-material'; import aa from 'search-insights' import algoliasearch from 'algoliasearch/lite'; import { InstantSearch, Configure, connectSearchBox, connectHits } from 'react-instantsearch-dom'; import { Zoom, Grid, Paper, TextField, Avatar, ButtonBase, InputAdornment, Typography, Button, Tooltip, List, ListItem, ListItemAvatar, ListItemText, } from '@mui/material'; import { useDebouncedCallback } from "../utils/useDebouncedCallback.jsx"; const searchClient = algoliasearch("JNSS5CFDZZ", "eb5fd80aa6ed5ab4730d836cff3ea283") const DocsGrid = props => { const { maxRows, showName, showSuggestion, isMobile, globalUrl, parsedXs, userdata, } = props const rowHandler = maxRows === undefined || maxRows === null ? 50 : maxRows const xs = parsedXs === undefined || parsedXs === null ? isMobile ? 6 : 2 : parsedXs //const [apps, setApps] = React.useState([]); //const [filteredApps, setFilteredApps] = React.useState([]); const innerColor = "rgba(255,255,255,0.65)" const borderRadius = 3 window.title = "Shuffle | Apps | Find and integrate any app" const SearchBox = ({currentRefinement, refine, isSearchStalled} ) => { var defaultSearch = "" if (window !== undefined && window.location !== undefined && window.location.search !== undefined && window.location.search !== null) { const urlSearchParams = new URLSearchParams(window.location.search) const params = Object.fromEntries(urlSearchParams.entries()) const foundQuery = params["q"] if (foundQuery !== null && foundQuery !== undefined) { console.log("Got query: ", foundQuery) refine(foundQuery) defaultSearch = foundQuery } } const debouncedRefine = useDebouncedCallback((value) => refine(value), 300) return (
) } var workflowDelay = -50 const Hits = ({ hits }) => { const [mouseHoverIndex, setMouseHoverIndex] = useState(-1) //console.log(hits) //var curhits = hits //if (hits.length > 0 && defaultApps.length === 0) { // setDefaultApps(hits) //} //const [defaultApps, setDefaultApps] = React.useState([]) //console.log(hits) //if (hits.length > 0 && hits.length !== innerHits.length) { // setInnerHits(hits) //} var counted = 0 return (