From f495a552167e751152cf279fda56e2514ed94f0c Mon Sep 17 00:00:00 2001 From: kira-pilot Date: Wed, 22 Jun 2022 20:18:45 +0000 Subject: [PATCH] added a default app icon resolves #2268 --- site/src/components/AppLink/AppLink.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/site/src/components/AppLink/AppLink.tsx b/site/src/components/AppLink/AppLink.tsx index c02ae839a6bf0..f57dd0ef32afa 100644 --- a/site/src/components/AppLink/AppLink.tsx +++ b/site/src/components/AppLink/AppLink.tsx @@ -1,6 +1,7 @@ import Link from "@material-ui/core/Link" import { makeStyles } from "@material-ui/core/styles" -import React, { FC } from "react" +import ComputerIcon from "@material-ui/icons/Computer" +import { FC } from "react" import * as TypesGen from "../../api/typesGenerated" import { combineClasses } from "../../util/combineClasses" @@ -8,7 +9,7 @@ export interface AppLinkProps { userName: TypesGen.User["username"] workspaceName: TypesGen.Workspace["name"] appName: TypesGen.WorkspaceApp["name"] - appIcon: TypesGen.WorkspaceApp["icon"] + appIcon?: TypesGen.WorkspaceApp["icon"] } export const AppLink: FC = ({ userName, workspaceName, appName, appIcon }) => { @@ -25,11 +26,15 @@ export const AppLink: FC = ({ userName, workspaceName, appName, ap window.open(href, appName, "width=900,height=600") }} > - {`${appName} + {appIcon ? ( + {`${appName} + ) : ( + + )} {appName} )