diff options
author | floppydiskette <floppydisk@hyprcat.net> | 2024-08-31 00:47:01 +0100 |
---|---|---|
committer | floppydiskette <floppydisk@hyprcat.net> | 2024-08-31 00:47:01 +0100 |
commit | a715ae58afa15a98006e2271522bef5a00ca071f (patch) | |
tree | 5e64ac5ac9e30fd14b96f8e88d3f449fda223ac1 /resources/views/components/discord-status.blade.php | |
parent | 97d8f4447d0839d3f251a7dfc2f5f123c36c4d5e (diff) |
Handle any errors if unable to get presence or weather data
Diffstat (limited to 'resources/views/components/discord-status.blade.php')
-rw-r--r-- | resources/views/components/discord-status.blade.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/resources/views/components/discord-status.blade.php b/resources/views/components/discord-status.blade.php index 00d2c7a..868fc03 100644 --- a/resources/views/components/discord-status.blade.php +++ b/resources/views/components/discord-status.blade.php @@ -1,3 +1,7 @@ -<span>I'm</span> -<h2 class="online-status" style="color: {{ $status["color"] }};text-shadow: var(--firefox-shadow) {{ $status["color"] }}4f !important">{{ $status["text"] }}!</h2> +@if($status == null) + <p>Status Unavailable</p> +@else + <span>I'm</span> + <h2 class="online-status" style="color: {{ $status["color"] }};text-shadow: var(--firefox-shadow) {{ $status["color"] }}4f !important">{{ $status["text"] }}!</h2> +@endif <p><strong>Time in Britain:</strong> <span id="clock"></span></p> |