Skip to content

Commit

Permalink
No modal on redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
blopker committed Aug 4, 2024
1 parent 81b1721 commit 9970149
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions assets/js/components/detailSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ function EventInfo(props: {
if (!props.eventStore.rsvp_url) return
e.preventDefault()
let response = await postData(props.eventStore.rsvp_url)
if (response.redirected) {
window.location.href = response.url
return
}
if (response.ok) {
props.refetchEvent()
setShowAttendingPopup(true)
Expand All @@ -157,9 +161,6 @@ function EventInfo(props: {
if (response.status >= 400) {
setError((await response.json())["error"])
}
if (response.redirected) {
window.location.href = response.url
}
}
async function handleGiveUp(e: Event) {
setShowAttendingPopup(false)
Expand Down
2 changes: 1 addition & 1 deletion totem/static/js/app.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions totem/static/js/app.min.js.map

Large diffs are not rendered by default.

0 comments on commit 9970149

Please sign in to comment.