Skip to content

Commit

Permalink
feat: add fallback logo for identity providers
Browse files Browse the repository at this point in the history
Signed-off-by: David Edler <david.edler@canonical.com>
  • Loading branch information
edlerd committed Jan 31, 2024
1 parent fd5d88f commit ca957ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
14 changes: 6 additions & 8 deletions ui/components/NodeInputSubmit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const NodeInputSubmit: FC<NodeInputProps> = ({
if (value.toLowerCase().startsWith("ping")) {
return "logos/Ping.svg";
}
return "";
return "logos/Fallback.svg";
};

const label = getNodeLabel(node);
Expand All @@ -47,13 +47,11 @@ export const NodeInputSubmit: FC<NodeInputProps> = ({
>
{isProvider ? (
<>
{image && (
<img
src={image}
alt={`${provider} logo`}
style={{ marginRight: "0.5rem" }}
/>
)}
<img
src={image}
alt={`${provider} logo`}
style={{ marginRight: "0.5rem" }}
/>
<span>Sign in with {label}</span>
</>
) : (
Expand Down
3 changes: 3 additions & 0 deletions ui/public/logos/Fallback.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ca957ee

Please sign in to comment.