Skip to content

Commit 7f6c90b

Browse files
committed
Fix Random Idea Button doesn't fetch new idea when in "/random" already
fixes #39 by updating Layout.js to do a http redirect instead of changing location. This causes the retrieveRandomIdea function in random.js to run again and get a different idea. Update Layout.js
1 parent cfeaf30 commit 7f6c90b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/components/Layout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ const Layout = ({ children }) => {
159159
<div className="navbar-end">
160160
<div className="navbar-item">
161161
<div className="buttons">
162-
<Link href="/random" className="button is-default">
162+
<Link className="button is-default" onClick={()=>window.location.replace("/random")}>
163163
Random Idea
164164
</Link>
165165
</div>

0 commit comments

Comments
 (0)