From 5674f0c8c8d933a654ea598535dc686d6dfcc9b0 Mon Sep 17 00:00:00 2001 From: Luck Date: Sat, 27 Mar 2021 21:23:47 +0000 Subject: [PATCH] ascii art makes everything better --- src/App.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/App.js b/src/App.js index 6aafd77..a32580a 100644 --- a/src/App.js +++ b/src/App.js @@ -52,7 +52,7 @@ export default function App() { useEffect(() => { if (pasteId && state === INITIAL) { setState(LOADING); - setContent('// Loading, please wait...') + setContent('Loading...') loadFromBytebin(pasteId).then(({ ok, content, type }) => { if (ok) { setContent(content); @@ -60,7 +60,7 @@ export default function App() { setContentType(type); } } else { - setContent('// Unable to load a paste with the id \'' + pasteId + '\'\n// Are you sure it exists? Maybe it expired?'); + setContent(get404Message(pasteId)); } setState(LOADED); }) @@ -69,3 +69,17 @@ export default function App() { return ; } + +function get404Message(pasteId) { + return ` + ██╗ ██╗ ██████╗ ██╗ ██╗ + ██║ ██║██╔═████╗██║ ██║ + ███████║██║██╔██║███████║ + ╚════██║████╔╝██║╚════██║ + ██║╚██████╔╝ ██║ + ╚═╝ ╚═════╝ ╚═╝ + + not found: '${pasteId}' + maybe the paste expired? +`; +} \ No newline at end of file