Remove unused div

This commit is contained in:
rui hildt 2020-07-28 12:15:43 +02:00
parent cfbbcf828a
commit bae264ec6e

View File

@ -25,10 +25,9 @@ const QUERY_ARTISTS = gql`
export default function App() { export default function App() {
const [inputValue, setInputValue] = useState(''); const [inputValue, setInputValue] = useState('');
const [ const [getArtists, { data, error, loading, variables }] = useLazyQuery(
getArtists, QUERY_ARTISTS,
{ data, error, loading, variables }, );
] = useLazyQuery(QUERY_ARTISTS);
const [artists, setArtists] = useState<Artists>([]); const [artists, setArtists] = useState<Artists>([]);
const [suggestions, setSuggestions] = useState<string[]>([]); const [suggestions, setSuggestions] = useState<string[]>([]);
const [selected, setSelected] = useState(false); const [selected, setSelected] = useState(false);
@ -126,13 +125,11 @@ export default function App() {
<Results artists={artists} handleClick={handleClick} /> <Results artists={artists} handleClick={handleClick} />
)} )}
{error && !errorNoSearchQuery && ( {error && !errorNoSearchQuery && (
<div style={{maxWidth: '400px', margin: '0' }}>
<pre> <pre>
{error.graphQLErrors.map(({ message }, i) => ( {error.graphQLErrors.map(({ message }, i) => (
<span key={i}>{message}</span> <span key={i}>{message}</span>
))} ))}
</pre> </pre>
</div>
)} )}
</Grommet> </Grommet>
); );