Skip to content

Commit

Permalink
Navigate when <dialog> element closes
Browse files Browse the repository at this point in the history
For comparison [see this commit][commit]

This higlights the previous commit's comment on reverting the state with
`history.back`. This feature was easier to implement because Superglue stores the
previous pages state in the Redux store, and if it doesn't exist the browser
will fallback to doing a full refresh.

[commit]: seanpdoyle@c7613b1
  • Loading branch information
jho406 committed Oct 8, 2023
1 parent 6aad18d commit 7d0cb9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/components/Dialog.js
Expand Up @@ -20,7 +20,7 @@ export default class extends React.Component {

render () {
return (
<dialog className='syos-dialog' ref={this.dialog}>
<dialog className='syos-dialog' ref={this.dialog} onClose={() => history.back()}>
{this.props.children}
</dialog>
)
Expand Down

0 comments on commit 7d0cb9a

Please sign in to comment.