chore(build): move to react 18 + vite
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
import React, { useState, useEffect, useRef, MutableRefObject } from "react";
|
||||
import {
|
||||
useState,
|
||||
useEffect,
|
||||
useRef,
|
||||
MutableRefObject,
|
||||
ReactNode,
|
||||
} from "react";
|
||||
import { useRecoilState } from "recoil";
|
||||
import { useDebounce } from "react-use";
|
||||
import { useHotkeys } from "react-hotkeys-hook";
|
||||
import { Command, MagnifyingGlass, X, HourglassHigh } from "phosphor-react";
|
||||
import ReactGA from "react-ga";
|
||||
|
||||
import { searchQueryAtom } from "../../state/atoms";
|
||||
import { searchQueryAtom } from "@/state/atoms";
|
||||
import "./SearchInput.css";
|
||||
|
||||
const apple = /iPhone|iPod|iPad|Macintosh|MacIntel|MacPPC/i;
|
||||
@@ -16,7 +22,7 @@ const isMobile = mobile.test(window.navigator.userAgent);
|
||||
|
||||
type SearchInputProps = {};
|
||||
|
||||
const SearchInput: React.FC<SearchInputProps> = () => {
|
||||
const SearchInput = (_: SearchInputProps) => {
|
||||
const [value, setValue] = useState<string>("");
|
||||
const [query, setQuery] = useRecoilState(searchQueryAtom);
|
||||
const inputRef =
|
||||
@@ -94,7 +100,7 @@ const SearchInput: React.FC<SearchInputProps> = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const Keys: React.FC<{}> = ({ children }) => (
|
||||
const Keys = ({ children }: { children?: ReactNode }) => (
|
||||
<div className="keys">{children}</div>
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user