Remove img alts

pull/1/head
J M Rossy 2 years ago
parent b486a90579
commit 78db2d656a
  1. 3
      .eslintrc
  2. 2
      src/components/icons/ChainToChain.tsx
  3. 2
      src/components/nav/Footer.tsx
  4. 37
      src/components/nav/Header.tsx
  5. 10
      src/features/search/MessageDetails.tsx
  6. 4
      src/features/search/MessageSearch.tsx

@ -29,6 +29,7 @@
"@typescript-eslint/no-explicit-any": ["off"], "@typescript-eslint/no-explicit-any": ["off"],
"@typescript-eslint/no-floating-promises": ["error"], "@typescript-eslint/no-floating-promises": ["error"],
"@typescript-eslint/no-non-null-assertion": ["off"], "@typescript-eslint/no-non-null-assertion": ["off"],
"@typescript-eslint/no-require-imports": ["warn"] "@typescript-eslint/no-require-imports": ["warn"],
"jsx-a11y/alt-text": ["off"]
} }
} }

@ -17,7 +17,7 @@ function _ChainToChain({
return ( return (
<div className="flex items-center justify-center sm:space-x-1 md:space-x-2"> <div className="flex items-center justify-center sm:space-x-1 md:space-x-2">
<ChainIcon chainId={originChainId} size={size} /> <ChainIcon chainId={originChainId} size={size} />
<Image src={ArrowRightIcon} alt="right" width={32} height={32} /> <Image src={ArrowRightIcon} width={32} height={32} />
<ChainIcon chainId={destinationChainId} size={size} /> <ChainIcon chainId={destinationChainId} size={size} />
</div> </div>
); );

@ -14,7 +14,7 @@ export function Footer() {
<div className="flex justify-between items-center"> <div className="flex justify-between items-center">
<div className="flex items-center"> <div className="flex items-center">
<div className="flex scale-90 sm:scale-100"> <div className="flex scale-90 sm:scale-100">
<Image src={Abacus} alt="Abacus" width={52} height={52} /> <Image src={Abacus} width={52} height={52} />
</div> </div>
<div className="flex flex-col ml-3"> <div className="flex flex-col ml-3">
<p className="text-sm font-light"> <p className="text-sm font-light">

@ -12,6 +12,9 @@ import Logo from '../../images/logos/abacus-with-name.svg';
export function Header() { export function Header() {
const { buttonProps, itemProps, isOpen, setIsOpen } = useDropdownMenu(4); const { buttonProps, itemProps, isOpen, setIsOpen } = useDropdownMenu(4);
const closeDropdown = () => {
setIsOpen(false);
};
const isMainnet = config.environment === Environment.Mainnet; const isMainnet = config.environment === Environment.Mainnet;
return ( return (
@ -20,13 +23,7 @@ export function Header() {
<Link href="/"> <Link href="/">
<a className="flex items-center"> <a className="flex items-center">
<div className="flex scale-90 sm:scale-100"> <div className="flex scale-90 sm:scale-100">
<Image <Image src={Logo} quality={100} width={130} height={35} />
src={Logo}
alt="Abacus"
quality={100}
width={130}
height={35}
/>
</div> </div>
<div className="font-serif text-[1.9rem] text-green-600 sm:ml-2 pt-px"> <div className="font-serif text-[1.9rem] text-green-600 sm:ml-2 pt-px">
Explorer Explorer
@ -57,7 +54,7 @@ export function Header() {
</div> </div>
<div className="relative flex item-center sm:hidden mr-2"> <div className="relative flex item-center sm:hidden mr-2">
<button className="hover:opactiy-70 transition-all" {...buttonProps}> <button className="hover:opactiy-70 transition-all" {...buttonProps}>
<Image src={HamburgerIcon} alt="Nav" width={22} height={22} /> <Image src={HamburgerIcon} width={22} height={22} />
</button> </button>
</div> </div>
</div> </div>
@ -70,14 +67,14 @@ export function Header() {
<a <a
{...itemProps[0]} {...itemProps[0]}
className={styles.dropdownOption} className={styles.dropdownOption}
onClick={() => setIsOpen(false)} onClick={closeDropdown}
> >
<DropdownItemContent icon={HouseIcon} text="Home" /> <DropdownItemContent icon={HouseIcon} text="Home" />
</a> </a>
</Link> </Link>
<a <a
{...itemProps[1]} {...itemProps[1]}
onClick={() => setIsOpen(false)} onClick={closeDropdown}
className={styles.dropdownOption} className={styles.dropdownOption}
target="_blank" target="_blank"
href="https://docs.useabacus.network" href="https://docs.useabacus.network"
@ -87,7 +84,7 @@ export function Header() {
</a> </a>
<a <a
{...itemProps[2]} {...itemProps[2]}
onClick={() => setIsOpen(false)} onClick={closeDropdown}
className={styles.dropdownOption} className={styles.dropdownOption}
target="_blank" target="_blank"
href="https://www.useabacus.network" href="https://www.useabacus.network"
@ -97,7 +94,7 @@ export function Header() {
</a> </a>
<a <a
{...itemProps[3]} {...itemProps[3]}
onClick={() => setIsOpen(false)} onClick={closeDropdown}
className={styles.dropdownOption} className={styles.dropdownOption}
href={isMainnet ? allConfigs.testnet2.url : allConfigs.mainnet.url} href={isMainnet ? allConfigs.testnet2.url : allConfigs.mainnet.url}
target="_blank" target="_blank"
@ -116,13 +113,7 @@ export function Header() {
function DropdownItemContent({ icon, text }: { icon: any; text: string }) { function DropdownItemContent({ icon, text }: { icon: any; text: string }) {
return ( return (
<> <>
<Image <Image src={icon} width={18} height={18} className="opacity-70 mr-2.5" />
src={icon}
alt=""
width={18}
height={18}
className="opacity-70 mr-2.5"
/>
<span>{text}</span> <span>{text}</span>
</> </>
); );
@ -136,13 +127,7 @@ function NetworkSelector() {
className="flex items-center pb-px hover:opacity-60 transition-all" className="flex items-center pb-px hover:opacity-60 transition-all"
{...buttonProps} {...buttonProps}
> >
<Image <Image src={HubIcon} width={20} height={20} className="opacity-70" />
src={HubIcon}
alt="Hub"
width={20}
height={20}
className="opacity-70"
/>
</button> </button>
<div <div
className={`${styles.dropdownContainer} ${!isOpen && 'hidden'} right-0`} className={`${styles.dropdownContainer} ${!isOpen && 'hidden'} right-0`}

@ -93,7 +93,7 @@ export function MessageDetails({ messageId }: { messageId: string }) {
)} )}
{isMessageFound && status === MessageStatus.Delivered && ( {isMessageFound && status === MessageStatus.Delivered && (
<StatusHeader text="Status: Delivered" fetching={fetching}> <StatusHeader text="Status: Delivered" fetching={fetching}>
<Image src={CheckmarkIcon} alt="checkmark" width={24} height={24} /> <Image src={CheckmarkIcon} width={24} height={24} />
</StatusHeader> </StatusHeader>
)} )}
{isMessageFound && status === MessageStatus.Failing && ( {isMessageFound && status === MessageStatus.Failing && (
@ -333,13 +333,7 @@ function ValueRow({
function ErrorIcon() { function ErrorIcon() {
return ( return (
<Image <Image src={ErrorCircleIcon} width={24} height={24} className="invert" />
src={ErrorCircleIcon}
alt="failure"
width={24}
height={24}
className="invert"
/>
); );
} }

@ -87,7 +87,7 @@ export function MessageSearch() {
<div className="bg-beige-500 h-10 sm:h-12 w-10 sm:w-12 flex items-center justify-center rounded"> <div className="bg-beige-500 h-10 sm:h-12 w-10 sm:w-12 flex items-center justify-center rounded">
{fetching && <Spinner classes="scale-[30%] mr-2.5" />} {fetching && <Spinner classes="scale-[30%] mr-2.5" />}
{!fetching && !searchInput && ( {!fetching && !searchInput && (
<Image src={SearchIcon} alt="Search" width={20} height={20} /> <Image src={SearchIcon} width={20} height={20} />
)} )}
{!fetching && searchInput && ( {!fetching && searchInput && (
<IconButton <IconButton
@ -110,7 +110,6 @@ export function MessageSearch() {
<div className="w-px h-8 bg-gray-100"></div> <div className="w-px h-8 bg-gray-100"></div>
<Image <Image
src={FunnelIcon} src={FunnelIcon}
alt="Filter"
width={22} width={22}
height={22} height={22}
className="opacity-50" className="opacity-50"
@ -123,7 +122,6 @@ export function MessageSearch() {
/> />
<Image <Image
src={ArrowRightIcon} src={ArrowRightIcon}
alt="Right"
width={30} width={30}
height={30} height={30}
className="opacity-50" className="opacity-50"

Loading…
Cancel
Save