import axios from "axios";
import React, { useState, useEffect } from 'react';
import ReactDOM from 'react-dom';
import '../node_modules/bootstrap/dist/css/bootstrap.min.css';
export default function App() {
const [randomQuote, setRandomQuote] = useState('');
const update = () => {
axios
.get(baseURL)
.then((res) => {
setRandomQuote(res.data);
});
};
useEffect(update, []);
if (!randomQuote) return null;
return (
<div>
<QuoteCard
quote={randomQuote.content}
author={randomQuote.author}
handleClick={update}
/>
</div>
)
}