Skip to content

Commit

Permalink
Merge pull request #1514 from Anmol-Baranwal/fix_terminal_warnings
Browse files Browse the repository at this point in the history
fix: terminal warnings and remove unnecessary code
  • Loading branch information
k-deepak04 authored Aug 9, 2023
2 parents e283b2d + 2e4b99d commit 15a3408
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 12 deletions.
6 changes: 4 additions & 2 deletions components/Searchbar/Searchbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ export const Searchbar: React.FC<SearchbarProps> = ({ setSearch }) => {
return (
<form onSubmit={handleSubmit} noValidate>
<div className="relative">
<div className="flex items-center" aria-role="search">
<label htmlFor="simple-search" className="sr-only">Quickly search any resources</label>
<div className="flex items-center" role="search">
<label htmlFor="simple-search" className="sr-only">
Quickly search any resources
</label>
<input
type="text"
id="simple-search"
Expand Down
34 changes: 24 additions & 10 deletions components/Share/Share.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react'
import React from 'react'
import { FiShare2 } from 'react-icons/fi'
import { Tooltip } from 'react-tooltip'

Expand All @@ -8,7 +8,7 @@ type ShareProps = {
}

export const Share: React.FC<ShareProps> = ({ url, title }) => {
const [showShareOptions, setShowShareOptions] = useState(false)
const showShareOptions = false

async function handleShare() {
if (navigator.share) {
Expand All @@ -34,15 +34,29 @@ export const Share: React.FC<ShareProps> = ({ url, title }) => {
display: 'inline-block',
}}
>
<button data-tooltip-id="share-tooltip" data-tooltip-content="Share" data-tooltip-place="bottom">
<FiShare2
size={'1.2rem'}
className="text-theme-primary cursor-pointer"
onClick={handleShare}
<button
data-tooltip-id="share-tooltip"
data-tooltip-content="Share"
data-tooltip-place="bottom"
>
<FiShare2
size={'1.2rem'}
className="text-theme-primary cursor-pointer"
onClick={handleShare}
/>
</button>
<Tooltip
id="share-tooltip"
style={{
backgroundColor: '#8b5cf6',
fontSize: '13px',
paddingLeft: '6px',
paddingRight: '6px',
paddingTop: '2px',
paddingBottom: '2px',
}}
/>
</button>
<Tooltip id='share-tooltip' style={{ backgroundColor: '#8b5cf6', fontSize: '13px', paddingLeft: '6px', paddingRight: '6px', paddingTop: '2px', paddingBottom: '2px' }} />


{showShareOptions && (
<p
className="bg-theme-secondary text-white text-sm rounded-lg px-3 py-1"
Expand Down

1 comment on commit 15a3408

@vercel
Copy link

@vercel vercel bot commented on 15a3408 Aug 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.