Skip to content

Instantly share code, notes, and snippets.

View Smnthjm08's full-sized avatar
🧿
Focusing

sumanth Smnthjm08

🧿
Focusing
  • Bangalore
  • 12:18 (UTC +05:30)
View GitHub Profile

Certainly. Here are the relevant code segments responsible for filtering in the MetrcTags component:

  1. Filter state and initialization:
const [selectedFilter, setSelectedFilter] = useState('All');
  1. Fetch data with filter:
<div class="relative bg-white dark:bg-gray-800">
<div class="flex flex-col sm:flex-row sm:justify-around">
<div class="h-screen w-72">
<nav class="px-6 mt-10">
<a class="flex items-center justify-start p-2 my-6 text-gray-600 transition-colors duration-200 hover:text-gray-800 bg-gray-50 dark:bg-gray-600 dark:text-gray-400hover:bg-gray-100 dark:hover:text-white dark:hover:bg-gray-600" href="#">
<svg width="20" height="20" fill="currentColor" viewBox="0 0 2048 1792" xmlns="http://www.w3.org/2000/svg">
<path fill="#5e72e4" d="M1024 1131q0-64-9-117.5t-29.5-103-60.5-78-97-28.5q-6 4-30 18t-37.5 21.5-35.5 17.5-43 14.5-42 4.5-42-4.5-43-14.5-35.5-17.5-37.5-21.5-30-18q-57 0-97 28.5t-60.5 78-29.5 103-9 117.5 37 106.5 91 42.5h512q54 0 91-42.5t37-106.5zm-157-520q0-94-66.5-160.5t-160.5-66.5-160.5 66.5-66.5 160.5 66.5 160.5 160.5 66.5 160.5-66.5 66.5-160.5zm925 509v-64q0-14-9-23t-23-9h-576q-14 0-23 9t-9 23v64q0 14 9 23t23 9h576q14 0 23-9t9-2