import React, { useState, useEffect } from 'react'; import { Link } from 'react-router-dom'; import reduxLang from '../middleware/lang'; import { Redirect } from 'react-router-dom'; const _StartScreen = ({ t, search }) => { const [searchQuery, setSearchQuery] = useState(''); const [searched, setSearched] = useState(false); const handleSearchInput = event => { setSearchQuery(event.target.value); }; const handleSearch = event => { event.preventDefault(); search(searchQuery); setSearched(true); }; if (searched) { return ; } return (
close
search
); }; const StartScreen = reduxLang('StartScreen')(_StartScreen); export default StartScreen;