yaml validation

This commit is contained in:
Ben Phelps 2022-09-18 16:41:01 +03:00
parent b5065673ab
commit 17f54da524
11 changed files with 83 additions and 32 deletions

View file

@ -22,12 +22,6 @@ function resolveIcon(icon) {
}
export default function Item({ service }) {
const handleOnClick = () => {
if (service.href && service.href !== "#") {
window.open(service.href, "_blank").focus();
}
};
const hasLink = service.href && service.href !== "#";
return (
@ -41,13 +35,9 @@ export default function Item({ service }) {
<div className="flex select-none">
{service.icon &&
(hasLink ? (
<button
type="button"
onClick={handleOnClick}
className="flex-shrink-0 flex items-center justify-center w-12 "
>
<a type="button" href={service.href} className="flex-shrink-0 flex items-center justify-center w-12 ">
<Image src={resolveIcon(service.icon)} width={32} height={32} alt="logo" />
</button>
</a>
) : (
<div className="flex-shrink-0 flex items-center justify-center w-12 ">
<Image src={resolveIcon(service.icon)} width={32} height={32} alt="logo" />
@ -57,7 +47,7 @@ export default function Item({ service }) {
{hasLink ? (
<button
type="button"
onClick={handleOnClick}
href={service.href}
className="flex-1 flex items-center justify-between rounded-r-md "
>
<div className="flex-1 px-2 py-2 text-sm text-left">