Skip to content

Commit 3c8c9c5

Browse files
committed
ui fixes
1 parent dd50b7f commit 3c8c9c5

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/App.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ function App() {
183183
}
184184
} else {
185185
console.error('Failed to retry summary:', response.statusText)
186+
// If the response is not ok, refresh the page
187+
if (typeof window !== 'undefined' && window.location) {
188+
window.location.reload()
189+
}
186190
}
187191
} catch (error) {
188192
console.error('Error retrying summary:', error)
@@ -223,6 +227,10 @@ function App() {
223227
})
224228
if (!response.ok) {
225229
console.error('Failed to rerun event:', response.statusText)
230+
// If the response is not ok, refresh the page
231+
if (typeof window !== 'undefined' && window.location) {
232+
window.location.reload()
233+
}
226234
return
227235
}
228236
const result = await response.json()

src/components/EventCard.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ const EventCard = ({ event, npub, name, profile_pic, onRerun, hideActions, model
117117
</div>
118118
{reason ? (
119119
<div
120-
className={`absolute right-0 mt-1 z-20 w-72 max-w-[80vw] rounded-md border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900 p-2 text-xs text-gray-700 dark:text-gray-200 shadow-lg ${showReason ? 'block' : 'hidden'} group-hover:block`}
120+
className={`absolute mt-1 z-20 w-[min(28rem,calc(100vw-2rem))] sm:w-[28rem] left-1/2 -translate-x-1/2 sm:left-auto sm:right-0 sm:translate-x-0 transform rounded-md border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900 p-2 text-xs text-gray-700 dark:text-gray-200 shadow-lg ${showReason ? 'block' : 'hidden'} group-hover:block`}
121121
role="tooltip"
122122
>
123123
<div className="flex items-center justify-between mb-1">

src/components/NewSummary.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ export default function NewSummary({ allSummaries, onCreated }) {
175175
setShow(false)
176176
} else {
177177
console.error('Failed to submit summary:', response.statusText)
178+
// If the response is not ok, refresh the page
179+
if (typeof window !== 'undefined' && window.location) {
180+
window.location.reload()
181+
}
178182
}
179183
} catch (error) {
180184
console.error('Error submitting summary:', error)

0 commit comments

Comments
 (0)