Skip to content

Commit

Permalink
fix warnings on Activity
Browse files Browse the repository at this point in the history
  • Loading branch information
hassan254-prog authored and TBonnin committed Jan 30, 2024
1 parent 6bed2ec commit 16d3ba9
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions packages/webapp/src/pages/Activity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ export default function Activity() {
onChange={handleStatusChange}
value={status}
>
<option key="" value="" disabled selected>Status</option>
<option key="" value="" disabled>Status</option>
<option key="success" value="success">Success</option>
<option key="progress" value="in_progress">In Progress</option>
<option key="failure" value="failure">Failure</option>
Expand All @@ -477,7 +477,7 @@ export default function Activity() {
onChange={handleScriptChange}
value={selectedScript}
>
<option key="" value="" disabled selected>Script</option>
<option key="" value="" disabled>Script</option>
{scripts.map((script: string) => (
<option key={script} value={script}>{script}</option>
))}
Expand All @@ -487,25 +487,6 @@ export default function Activity() {
)}
</div>
)}
{integrations.length > 0 && (
<div className="flex w-full items-center">
<select
id="integration"
name="integration"
className="bg-bg-black border-none text-text-light-gray block w-full appearance-none py-2 text-base shadow-sm"
onChange={handleIntegrationChange}
value={selectedIntegration}
>
<option key="" value="" disabled selected>Integration</option>
{integrations.map((integration: string) => (
<option key={integration} value={integration}>{integration}</option>
))}
</select>
{selectedIntegration && (
<XCircleIcon onClick={() => onRemoveFilter(setSelectedIntegration, 'integration')} className="flex h-7 h-7 cursor-pointer text-blue-400" />
)}
</div>
)}
{connections.length > 0 && (
<div className="flex w-full items-center">
<select
Expand All @@ -515,7 +496,7 @@ export default function Activity() {
onChange={handleConnectionChange}
value={selectedConnection}
>
<option key="" value="" disabled selected>Connection</option>
<option key="" value="" disabled>Connection</option>
{connections.map((connection: string) => (
<option key={connection} value={connection}>{connection}</option>
))}
Expand All @@ -525,6 +506,25 @@ export default function Activity() {
)}
</div>
)}
{integrations.length > 0 && (
<div className="flex w-full items-center">
<select
id="integration"
name="integration"
className="bg-bg-black border-none text-text-light-gray block w-full appearance-none py-2 text-base shadow-sm"
onChange={handleIntegrationChange}
value={selectedIntegration}
>
<option key="" value="" disabled>Integration</option>
{integrations.map((integration: string) => (
<option key={integration} value={integration}>{integration}</option>
))}
</select>
{selectedIntegration && (
<XCircleIcon onClick={() => onRemoveFilter(setSelectedIntegration, 'integration')} className="flex h-7 h-7 cursor-pointer text-blue-400" />
)}
</div>
)}
<div className="flex w-full items-center">
<input
type="date"
Expand All @@ -547,10 +547,10 @@ export default function Activity() {
<ChevronsLeft onClick={resetOffset} className="flex stroke-white cursor-pointer mr-3" size="16" />
)}
<span onClick={decrementPage} className={`flex ${offset - limit >= 0 ? 'cursor-pointer hover:bg-gray-700' : ''} h-8 mr-2 rounded-md px-3 pt-1.5 text-sm text-white bg-gray-800`}>
<svg aria-hidden="true" className="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z" clip-rule="evenodd"></path></svg>
<svg aria-hidden="true" className="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fillRule="evenodd" d="M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z" clipRule="evenodd"></path></svg>
</span>
<span onClick={incrementPage} className={`flex ${activities.length < limit ? '' : 'cursor-pointer hover:bg-gray-700'} h-8 rounded-md px-3 pt-1.5 text-sm text-white bg-gray-800`}>
<svg aria-hidden="true" className="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
<svg aria-hidden="true" className="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fillRule="evenodd" d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z" clipRule="evenodd"></path></svg>
</span>
</div>
</div>
Expand Down

0 comments on commit 16d3ba9

Please sign in to comment.