From 976441c74c73aa797680c582f0cb3a1946e288f7 Mon Sep 17 00:00:00 2001 From: Anmol-Baranwal <74038190+Anmol-Baranwal@users.noreply.github.com> Date: Tue, 8 Aug 2023 11:34:43 +0530 Subject: [PATCH 1/3] fix: invalid aria-role attribute in searchbar --- components/Searchbar/Searchbar.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/Searchbar/Searchbar.tsx b/components/Searchbar/Searchbar.tsx index 033f279b8..5ed0a9749 100644 --- a/components/Searchbar/Searchbar.tsx +++ b/components/Searchbar/Searchbar.tsx @@ -67,8 +67,10 @@ export const Searchbar: React.FC = ({ setSearch }) => { return (
-
- +
+ Date: Tue, 8 Aug 2023 11:38:06 +0530 Subject: [PATCH 2/3] fix: remove unused code and fix terminal warnings --- components/Share/Share.tsx | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/components/Share/Share.tsx b/components/Share/Share.tsx index 24c20f2e1..fc318bb22 100644 --- a/components/Share/Share.tsx +++ b/components/Share/Share.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react' +import React from 'react' import { FiShare2 } from 'react-icons/fi' import { Tooltip } from 'react-tooltip' @@ -8,8 +8,6 @@ type ShareProps = { } export const Share: React.FC = ({ url, title }) => { - const [showShareOptions, setShowShareOptions] = useState(false) - async function handleShare() { if (navigator.share) { try { @@ -34,15 +32,29 @@ export const Share: React.FC = ({ url, title }) => { display: 'inline-block', }} > - + - - - + {showShareOptions && (

Date: Tue, 8 Aug 2023 12:45:12 +0530 Subject: [PATCH 3/3] fix: broken share code removing useState since there was no assigning of value --- components/Share/Share.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/Share/Share.tsx b/components/Share/Share.tsx index fc318bb22..fdc17cb1c 100644 --- a/components/Share/Share.tsx +++ b/components/Share/Share.tsx @@ -8,6 +8,8 @@ type ShareProps = { } export const Share: React.FC = ({ url, title }) => { + const showShareOptions = false + async function handleShare() { if (navigator.share) { try {