diff --git a/src/components/app.tsx b/src/components/app.tsx index aabd910..6d38867 100644 --- a/src/components/app.tsx +++ b/src/components/app.tsx @@ -3,10 +3,16 @@ import Icon from "./icon"; import styled from "styled-components"; import selectedTheme from "../lib/theme"; -const AppContainer = styled.div` +const AppContainer = styled.a` display: flex; - flex: auto 25%; + flex: 1 0 auto; padding: 1rem; + color: ${selectedTheme.mainColor}; + font-weight: 500; + text-transform: uppercase; + margin: 0; + text-decoration: none; + font-size: 1rem; `; const IconContainer = styled.div` @@ -21,16 +27,8 @@ const DetailsContainer = styled.div` flex-direction: column; `; -const AppLink = styled.a` - flex: 1 0 auto; - color: ${selectedTheme.mainColor}; - font-weight: 500; - text-transform: uppercase; - margin: 0; - text-decoration: none; - font-size: 1rem; - - &:hover { +const AppName = styled.div` + a:hover & { text-decoration: underline; } `; @@ -59,18 +57,18 @@ export const App = ({ name, icon, url, displayURL, newTab }: IAppProps) => { useEffect(() => { console.log(newTab) }, [newTab]) + const linkAttrs = (newTab !== undefined && newTab) ? { + target: '_blank', + rel: 'noopener noreferrer', + } : {}; + return ( - + - - { - (newTab !== undefined && newTab) ? - {name} : {name} - } - + {name} {displayURL} diff --git a/yarn.lock b/yarn.lock index 0b752ad..844b1d2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5645,9 +5645,9 @@ hoopy@^0.1.4: integrity sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ== hosted-git-info@^2.1.4: - version "2.8.8" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" - integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== hpack.js@^2.1.6: version "2.1.6" @@ -10304,9 +10304,9 @@ sshpk@^1.7.0: tweetnacl "~0.14.0" ssri@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" - integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== + version "6.0.2" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5" + integrity sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q== dependencies: figgy-pudding "^3.5.1"