Skip to content

Commit

Permalink
refactor(docs): select dx
Browse files Browse the repository at this point in the history
  • Loading branch information
wingkwong committed Nov 16, 2024
1 parent 0293b31 commit 695ef48
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable no-console */

import {Select, SelectItem} from "@nextui-org/react";
import {useInfiniteScroll} from "@nextui-org/use-infinite-scroll";

Expand Down Expand Up @@ -38,8 +36,10 @@ export function usePokemonList({fetchDelay = 0} = {}) {
setItems((prevItems) => [...prevItems, ...json.results]);
} catch (error) {
if (error.name === "AbortError") {
// eslint-disable-next-line no-console
console.log("Fetch aborted");
} else {
// eslint-disable-next-line no-console
console.error("There was an error with the fetch operation:", error);
}
} finally {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable no-console */

import React from "react";
import {Select, SelectItem} from "@nextui-org/react";
import {useInfiniteScroll} from "@nextui-org/use-infinite-scroll";
Expand Down Expand Up @@ -49,8 +47,10 @@ export function usePokemonList({fetchDelay = 0}: UsePokemonListProps = {}) {
setItems((prevItems) => [...prevItems, ...json.results]);
} catch (error) {
if (error.name === "AbortError") {
// eslint-disable-next-line no-console
console.log("Fetch aborted");
} else {
// eslint-disable-next-line no-console
console.error("There was an error with the fetch operation:", error);
}
} finally {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type {Selection} from "@nextui-org/react";

import React from "react";
import {Select, SelectItem, Selection} from "@nextui-org/react";
import {Select, SelectItem} from "@nextui-org/react";

export const animals = [
{key: "cat", label: "Cat"},
Expand Down

0 comments on commit 695ef48

Please sign in to comment.