Skip to content

Commit

Permalink
Update ErrorMessage.js
Browse files Browse the repository at this point in the history
Co-Authored-By: Théo Galy-Fajou <[email protected]>
  • Loading branch information
fonsp and theogf committed Oct 3, 2024
1 parent 866605f commit 826ce2e
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions frontend/components/ErrorMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,31 +474,39 @@ const motivational_words = [
//
"Don't panic!",
"Keep calm, you got this!",
"You got this!",
"Silly computer!",
"Silly computer!",
"beep boop CRASH 🤖",
"computer bad, you GREAT!",
"Probably not your fault!",
"Try asking on Julia Discourse!",
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
"uhmmmmmm??!",
"Maybe time for a break? ☕️",
"Everything is going to be okay!",
"Computers are hard!",
"C'est la vie !",
"¯\\_(ツ)_/¯",
"Oh no! 🙀",
"this suckz 💣",
...Array(30).fill(null),
]

const Motivation = ({ stacktrace }) => {
const msg = useMemo(() => {
return motivational_words[Math.floor(Math.random() * motivational_words.length)]
}, [stacktrace])

return msg == null ? null : html`<div class="dont-panic">${msg}</div>`
return msg == null
? null
: html`<div
class="dont-panic"
onClick=${(e) => {
window.open("https://discourse.julialang.org/", "_blank")?.focus()
}}
>
${msg}
</div>`
}

const get_erred_upstreams = (
Expand Down

0 comments on commit 826ce2e

Please sign in to comment.