Skip to content

Commit

Permalink
Fix Random Idea Button doesn't fetch new idea when in "/random" already
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tralwdwd committed Nov 13, 2024
1 parent cfeaf30 commit 116561c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/components/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ const Layout = ({ children }) => {
<div className="navbar-end">
<div className="navbar-item">
<div className="buttons">
<Link href="/random" className="button is-default">
<Link className="button is-default" onClick={()=>window.location.replace("/random");}>
Random Idea
</Link>
</div>
Expand Down

0 comments on commit 116561c

Please sign in to comment.