From b787a6fa5d34a202925a38b2909f2d79f355f1a0 Mon Sep 17 00:00:00 2001 From: bang9 Date: Tue, 20 Aug 2024 16:01:18 +0900 Subject: [PATCH] feat: add not found error page to playground --- packages/self-service/playground/index.html | 83 ++++++++++++++++++++- 1 file changed, 80 insertions(+), 3 deletions(-) diff --git a/packages/self-service/playground/index.html b/packages/self-service/playground/index.html index 17410ec10..752174a86 100644 --- a/packages/self-service/playground/index.html +++ b/packages/self-service/playground/index.html @@ -1,4 +1,4 @@ - + @@ -27,9 +27,69 @@ #aichatbot-widget-close-icon { display: none; } + .hide { + display: none; + } + .sb-pg-not-found { + padding-block-start: 54px; + display: flex; + flex-direction: column; + align-items: center; + } + .sb-pg-not-found-title { + color: #0d0d0d; + font-family: sans-serif; + font-size: 64px; + font-weight: 700; + margin-bottom: 20px; + } + .sb-pg-not-found-desc { + color: #424242; + font-family: sans-serif; + font-size: 22px; + font-style: normal; + font-weight: 400; + margin-bottom: 40px; + } + .sb-playground-button { + width: fit-content; + border-radius: 200px; + padding: 13px 32px; + text-align: center; + font-weight: 600; + color: white; + background-color: #6210cc; + margin-bottom: 56px; + cursor: pointer; + text-decoration: none; + } + .sb-playground-button:hover { + background-color: #4b11a1; + } +
+
+ + + +
+
+ Page not found + We can't seem to find the page you are looking for. + + Explore Sendbird AI chatbot + + not-found +
+
@@ -47,9 +107,26 @@ const apiHost = region ? `https://api-cf-${region}.sendbird.com` : undefined; if (title) document.title = title; - if (!appId || !botId) return null; + if (!appId || !botId) { + window.document.getElementById('root').classList.add('hide'); + window.document.getElementById('error').classList.remove('hide'); + return null; + } - return ; + return ( + + ); }; ReactDOM.createRoot(document.querySelector('#root')).render();