Skip to content

Commit

Permalink
Merge branch 'main' into teams-page
Browse files Browse the repository at this point in the history
  • Loading branch information
dcts authored Sep 3, 2024
2 parents 4bda694 + 482f92c commit dbcd7bd
Show file tree
Hide file tree
Showing 4 changed files with 414 additions and 129 deletions.
223 changes: 101 additions & 122 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions src/app/components/PairSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { orderInputSlice } from "../state/orderInputSlice";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import Image from "next/image";
import React from "react";
import { searchPairs } from "utils";

import { BLACKLISTED_PAIRS } from "../data/BLACKLISTED_PAIRS";

Expand Down Expand Up @@ -163,13 +164,9 @@ export function PairSelector() {
}, [handleKeyDown]);

const onQueryChange = (userInputQuery: string) => {
const sortedOptions = sortOptions(
options.filter(
(option) =>
option["name"].toLowerCase().indexOf(userInputQuery.toLowerCase()) >
-1
)
);
const filteredPairs = searchPairs(userInputQuery, options);
const sortedOptions = sortOptions(filteredPairs);

setFilteredOptions(sortedOptions);
setQuery(userInputQuery);
// Reset the current selected option to the first one that is available
Expand Down
Loading

0 comments on commit dbcd7bd

Please sign in to comment.