fix: stop quotes reloading (#37342)

This commit is contained in:
Oliver Eyton-Williams
2019-10-16 19:15:39 +02:00
committed by mrugesh
parent f0c1d3a759
commit 6ce9482b22

View File

@ -7,8 +7,12 @@ import { randomQuote } from '../../utils/get-words';
import './welcome.css';
function Welcome({ name }) {
// created outside the function, so that the quotes don't change unless the
// page is reloaded.
const { quote, author } = randomQuote();
function Welcome({ name }) {
return (
<Fragment>
<Row>