Skip to content

Commit

Permalink
replace login error with component
Browse files Browse the repository at this point in the history
  • Loading branch information
laushinka committed May 20, 2022
1 parent 66cd763 commit e6fe246
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions components/dashboard/src/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import prebuild from "./images/welcome/prebuild.svg";
import exclamation from "./images/exclamation.svg";
import { getURLHash } from "./App";
import FeedbackComponent from "./feedback-form/FeedbackComponent";
import ErrorMessage from "./components/ErrorMessage";

function Item(props: { icon: string; iconSize?: string; text: string }) {
const iconSize = props.iconSize || 28;
Expand Down Expand Up @@ -226,17 +227,7 @@ export function Login() {
))
)}
</div>

{errorMessage && (
<div className="mt-16 mb-10 flex space-x-2 py-6 px-6 w-96 justify-between bg-gitpod-kumquat-light rounded-xl">
<div className="pr-3 self-center w-6">
<img src={exclamation} />
</div>
<div className="flex-1 flex flex-col">
<p className="text-gitpod-red text-sm">{errorMessage}</p>
</div>
</div>
)}
{errorMessage && <ErrorMessage imgSrc={exclamation} message={errorMessage} />}
</div>
</div>
{errorMessage && <FeedbackComponent message={"Was this error message helpful?"} initialSize={24} />}
Expand Down

0 comments on commit e6fe246

Please sign in to comment.