Skip to content

Commit

Permalink
load images locally and use rarity score asc/desc state based
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishant Pai authored and Nishant Pai committed May 3, 2023
1 parent 783227c commit 48b61ae
Show file tree
Hide file tree
Showing 2,551 changed files with 2,580 additions and 2,621 deletions.
103 changes: 31 additions & 72 deletions components/Tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,86 +82,45 @@ export const Tools = (props) => {
<h3 className="text-xs text-gray-700 uppercase mb-2 font-bold">
Sort By
</h3>
{!(sort_by == "rarity_score" && order == "desc") && (
<a
className="hover:bg-gray-300 hover:text-gray-900 cursor-pointer text-xs text-gray-700 py-2 px-2 rounded-md w-full flex items-center"
onClick={() => {
<a
className="hover:bg-gray-300 hover:text-gray-900 cursor-pointer text-xs text-gray-700 py-2 px-2 rounded-md w-full flex items-center"
onClick={() => {
if (sort_by == "rarity_score" && order == "asc") {
handleChange("rarity desc");
}}
>
<span c lassName="text-xs">
<ImSortNumbericDesc />
</span>
<span className="text-xs">&nbsp;&nbsp;Rarity</span>
</a>
)}

{!(sort_by == "rarity_score" && order == "asc") && (
<a
className="hover:bg-gray-300 hover:text-gray-900 cursor-pointer text-gray-700 py-2 px-2 rounded-md w-full flex items-center"
onClick={() => {
} else {
handleChange("rarity asc");
}}
>
<span className="text-xs">
}
}}
>
<span className="text-xs">
{sort_by == "rarity_score" && order == "desc" ? (
<ImSortNumericAsc />
</span>
<span className="text-xs">&nbsp;&nbsp;Rarity</span>
</a>
)}
{/* {!(sort_by == "rarity_score_normalized" && order == "desc") && (
<a
className="hover:bg-gray-300 hover:text-gray-900 cursor-pointer text-xs text-gray-700 py-2 px-2 rounded-md w-full flex items-center"
onClick={() => {
handleChange("normalize desc");
}}
>
<span c lassName="text-xs">
) : (
<ImSortNumbericDesc />
</span>
<span className="text-xs">&nbsp;&nbsp;Rarity (normalized)</span>
</a>
)} */}
{/* {!(sort_by == "rarity_score" && order == "asc") && (
<a
className="hover:bg-gray-300 hover:text-gray-900 cursor-pointer text-gray-700 py-2 px-2 rounded-md w-full flex items-center"
onClick={() => {
handleChange("normalize asc");
}}
>
<span className="text-xs">
<ImSortNumericAsc />
</span>
<span className="text-xs">&nbsp;&nbsp;Rarity (normalized)</span>
</a>
)} */}
)}
</span>
<span className="text-xs">&nbsp;&nbsp;Rarity</span>
</a>

{!(sort_by == "id" && order == "desc") && (
<a
className="hover:bg-gray-300 hover:text-gray-900 cursor-pointer text-gray-700 py-2 px-2 rounded-md w-full flex items-center"
onClick={() => {
<a
className="hover:bg-gray-300 hover:text-gray-900 cursor-pointer text-gray-700 py-2 px-2 rounded-md w-full flex items-center"
onClick={() => {
if (sort_by == "id" && order == "asc") {
handleChange("id desc");
}}
>
<span className="text-xs">
<ImSortNumbericDesc />
</span>
<span className="text-xs">&nbsp;&nbsp;Token ID</span>
</a>
)}
{!(sort_by == "id" && order == "asc") && (
<a
className="hover:bg-gray-300 hover:text-gray-900 cursor-pointer text-gray-700 py-2 px-2 rounded-md w-full flex items-center"
onClick={() => {
} else {
handleChange("id asc");
}}
>
<span className="text-xs">
}
}}
>
<span className="text-xs">
{sort_by == "id" && order == "desc" ? (
<ImSortNumericAsc />
</span>
<span className="text-xs">&nbsp;&nbsp;Token ID</span>
</a>
)}
) : (
<ImSortNumbericDesc />
)}
</span>
<span className="text-xs">&nbsp;&nbsp;Token ID</span>
</a>
</div>
);
};
Loading

0 comments on commit 48b61ae

Please sign in to comment.