diff --git a/package.json b/package.json index 15abc9c..25bee68 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-hook-form": "^7.42.1", + "react-ogp": "^0.0.3", "sass": "^1.57.1", "usehooks-ts": "^2.9.1", "zod": "^3.20.2" diff --git a/src/pages/index.tsx b/src/pages/index.tsx new file mode 100644 index 0000000..6f6224d --- /dev/null +++ b/src/pages/index.tsx @@ -0,0 +1,108 @@ +import {type NextPage} from "next"; +import Head from "next/head"; +import {useRef, useState} from "react"; +import Generic, {type ParsedGeneric} from "@/components/Generic"; +import useLookup from "@/hooks/useLookup"; +import {onPromise} from "@/helpers"; +import {OGP} from "react-ogp"; + +const Index: NextPage = () => { + const {error, setTarget, submit, currentType} = useLookup(); + const inputRef = useRef(); + const [response, setResponse] = useState(); + + return ( + <> + + rdap.xevion.dev + + + + + + <> + + +
+
r ?? null); + })} className="form-inline"> +
+
+ setTarget(e.currentTarget.value)} + className="form-control bg-zinc-800 focus:bg-zinc-700 focus:border-zinc-600 border-zinc-700 text-zinc-200" + type="text" + /> +
+
+
+ +
+
+ Options:  + +   + +
+
+
+ {error} +
+
+ {response != null ? : null} +
+
+ + + ); +}; + +export default Index; diff --git a/yarn.lock b/yarn.lock index d63b1f4..cf0d800 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2067,6 +2067,11 @@ react-is@^16.13.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +react-ogp@^0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/react-ogp/-/react-ogp-0.0.3.tgz#f3d49ff49e593576778f6a11824a4ccb2d8b427d" + integrity sha512-+m5my7G6dxzN79e1e/M5VV2MmM2sXrTqs+hfL8sFHsjWn4PMv3P8eD/aMSHPibvp6BYsiFCeWMMSzcqUCIQr9w== + react@18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"