Skip to content

Commit

Permalink
chore(console): tweaks to blue screen of death (#6560)
Browse files Browse the repository at this point in the history
* Remove the title (we know it's an error...)
* Change the text from "Copy error" to just "Copy"

## Checklist

- [x] Title matches [Winglang's style
guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted)
- [x] Description explains motivation and solution
- [x] Tests added (always)
- [x] Docs updated (only required for features)
- [x] Added `pr/e2e-full` label if this feature requires end-to-end
testing

*By submitting this pull request, I confirm that my contribution is made
under the terms of the [Wing Cloud Contribution
License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.

---------

Signed-off-by: monada-bot[bot] <[email protected]>
Co-authored-by: wingbot <[email protected]>
Co-authored-by: monada-bot[bot] <[email protected]>
  • Loading branch information
3 people authored May 26, 2024
1 parent 4b42f9d commit c3b07d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 1 addition & 5 deletions apps/wing-console/console/ui/src/layout/default-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,7 @@ export const DefaultLayout = ({
{cloudAppState === "error" &&
layout.errorScreen?.position === "default" && (
<div className="flex-1 flex relative">
<BlueScreenOfDeath
title="An error has occurred"
error={errorMessage.data ?? ""}
/>
<BlueScreenOfDeath error={errorMessage.data ?? ""} />
</div>
)}

Expand Down Expand Up @@ -424,7 +421,6 @@ export const DefaultLayout = ({
)}
>
<BlueScreenOfDeath
title="An error has occurred"
error={errorMessage.data ?? ""}
displayLinks={layout.errorScreen?.displayLinks}
/>
Expand Down
4 changes: 1 addition & 3 deletions apps/wing-console/console/ui/src/ui/blue-screen-of-death.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export const BlueScreenOfDeath = memo(
error = "",
displayLinks = true,
}: {
title: string;
error: string;
displayLinks?: boolean;
}) => {
Expand Down Expand Up @@ -48,15 +47,14 @@ export const BlueScreenOfDeath = memo(
>
<div className="h-full w-full text-md font-share-tech text-white max-w-7xl break-words space-y-4">
<div className="flex items-center gap-x-4">
<div className="underline">{title}</div>
<button
onClick={copyError}
className={classNames(
"text-center px-4 py-1 transition-all",
"bg-slate-400 hover:bg-slate-450 px-4 text-[#004295]",
)}
>
Copy error
Copy
</button>
</div>
<div className="space-y-4">
Expand Down

0 comments on commit c3b07d7

Please sign in to comment.