chore(build): move to react 18 + vite

This commit is contained in:
rektdeckard
2023-02-02 22:15:00 -07:00
parent ced8732edb
commit 1b8d6c48fc
46 changed files with 198 additions and 450 deletions

View File

@@ -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>
);