Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React, {useEffect, useState} from 'react';
import { connect } from 'react-redux';
import Slider from '../components/Slider'
import AnimSearch from '../components/AnimSearch'
import SearchBox from '../components/Search'
import Spacer from '../components/Spacer'
import SeoComponent from '../components/SeoComponent'
import { isMobile, imdbToMovie, idToPoster } from '../helpers'
import Share from '../components/Share'
import FlexSearch from 'flexsearch/dist/flexsearch.min'
var index = new FlexSearch({
profile:"fast",
async: true,
cache: true
});
let isFired = false
function App({ movies, searchQ, route }) {
const { match } = route
const urlQuery = (match && match.params) ? match.params.q : null
const [searchQuery, setSearchQuery] = useState(null)
const [results, setResults] = useState([])
useEffect(() => {
if (!isFired) {