The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
added swipe to delete links
Steven Teyd42a4fc6843b
diff --git a/components/app/link-card-placeholder.tsx b/components/app/link-card-placeholder.tsxindex a5cda8ddf9..0fdfca48fa 100644--- a/components/app/link-card-placeholder.tsx+++ b/components/app/link-card-placeholder.tsx@@ -1,12 +1,6 @@-import { motion } from "framer-motion";-import { FRAMER_MOTION_LIST_ITEM_VARIANTS } from "@/lib/constants";-export default function LinkCardPlaceholder() {return (- <motion.li- variants={FRAMER_MOTION_LIST_ITEM_VARIANTS}- className="flex items-center border border-gray-200 bg-white p-4 rounded-md transition-all"- >+ <li className="flex items-center border border-gray-200 bg-white p-4 rounded-md transition-all"><div className="w-10 h-10 rounded-full mr-2 bg-gray-200 animate-pulse" /><div><div className="flex items-center space-x-2 mb-2.5">@@ -16,6 +10,6 @@ export default function LinkCardPlaceholder() {</div><div className="w-72 h-4 rounded-md bg-gray-200 animate-pulse" /></div>- </motion.li>+ </li>);}diff --git a/components/app/link-card.tsx b/components/app/link-card.tsxindex 9e04998a48..9c94537004 100644--- a/components/app/link-card.tsx+++ b/components/app/link-card.tsx@@ -38,7 +38,7 @@ export default function LinkCard({});return (- <div className="flex flex-col sm:flex-row justify-between items-start sm:items-center space-y-5 sm:space-y-0 border border-gray-200 bg-white p-4 rounded-md transition-all">+ <li className="flex flex-col sm:flex-row justify-between items-start sm:items-center space-y-5 sm:space-y-0 border border-gray-200 bg-white p-4 rounded-md transition-all"><EditLinkModal /><div className="relative flex items-center space-x-4"><BlurImage@@ -103,6 +103,6 @@ export default function LinkCard({</button>)}</div>- </div>+ </li>);}diff --git a/components/app/links-container.tsx b/components/app/links-container.tsxindex 6a118237f1..598fb7fdd3 100644--- a/components/app/links-container.tsx+++ b/components/app/links-container.tsx@@ -27,7 +27,7 @@ export default function LinksContainer({return (<MaxWidthWrapper>- <div className="py-10 grid grid-cols-1 gap-3">+ <ul className="py-10 grid grid-cols-1 gap-3">{links ? (links.length > 0 ? (links.map((props) => (@@ -46,7 +46,7 @@ export default function LinksContainer({<LinkCardPlaceholder key={i} />)))}- </div>+ </ul></MaxWidthWrapper>);}diff --git a/components/home/link-card.tsx b/components/home/link-card.tsxindex afd2aefa89..90029c81a6 100644--- a/components/home/link-card.tsx+++ b/components/home/link-card.tsx@@ -1,4 +1,4 @@-import { useCallback, useEffect } from "react";+import { useCallback, useEffect, useMemo, useRef, useState } from "react";import BlurImage from "@/components/shared/blur-image";import CopyButton from "@/components/shared/copy-button";import { Chart, LoadingDots } from "@/components/shared/icons";@@ -6,16 +6,23 @@ import { useRouter } from "next/router";import useSWR from "swr";import { fetcher, nFormatter, linkConstructor } from "@/lib/utils";import Link from "next/link";-import { motion } from "framer-motion";+import { motion, useMotionValue, useAnimation } from "framer-motion";import { FRAMER_MOTION_LIST_ITEM_VARIANTS } from "@/lib/constants";import { useStatsModal } from "@/components/stats/stats-modal";+import { SimpleLinkProps } from "@/lib/types";+import toast from "react-hot-toast";+import { useDebouncedCallback } from "use-debounce";export default function LinkCard({_key: key,url,+ hashes,+ setHashes,}: {_key: string;url: string;+ hashes?: SimpleLinkProps[];+ setHashes?: (hashes: SimpleLinkProps[]) => void;}) {const urlHostname = new URL(url).hostname;@@ -47,11 +54,85 @@ export default function LinkCard({return () => document.removeEventListener("keydown", onKeyDown);}, [onKeyDown]);+ const cardElem = useRef(null);++ const x = useMotionValue(0);+ const controls = useAnimation();++ const [constrained, setConstrained] = useState(true);++ const [velocity, setVelocity] = useState<number>();++ const isDelete = (childNode, parentNode) => {+ const childRect = childNode.getBoundingClientRect();+ const parentRect = parentNode.getBoundingClientRect();+ return parentRect.left >= childRect.right ||+ parentRect.right <= childRect.left+ ? true+ : undefined;+ };++ // determine direction of swipe based on velocity+ const direction = useMemo(() => {+ return velocity >= 1 ? "right" : velocity <= -1 ? "left" : undefined;+ }, [velocity]);++ const flyAway = (min) => {+ const flyAwayDistance = (direction) => {+ const parentWidth =+ cardElem.current.parentNode.getBoundingClientRect().width;+ const childWidth = cardElem.current.getBoundingClientRect().width;+ return direction === "left"+ ? -parentWidth / 2 - childWidth / 2+ : parentWidth / 2 + childWidth / 2;+ };+ console.log("velocity", velocity, "direction", direction);+ if (direction && Math.abs(velocity) > min) {+ console.log("flying away");+ setConstrained(false);+ controls.start({+ x: flyAwayDistance(direction),+ });+ }+ };++ const sendErrorToast = useDebouncedCallback(+ () => toast.error("Cannot delete root tweet."),+ 100+ );++ useEffect(() => {+ const unsubscribeX = x.onChange(() => {+ if (cardElem.current) {+ const childNode = cardElem.current;+ const parentNode = cardElem.current.parentNode;+ const deleted = isDelete(childNode, parentNode);+ if (deleted) {+ if (hashes && setHashes) {+ setHashes(hashes.filter((hash) => hash.key !== key));+ toast.success("Link deleted.");+ } else {+ sendErrorToast(); // debounce to prevent multiple toasts+ }+ }+ }+ });++ return () => unsubscribeX();+ });+return (<motion.li variants={FRAMER_MOTION_LIST_ITEM_VARIANTS}><motion.div+ animate={controls}drag="x"- dragConstraints={{ left: 0, right: 0 }}+ dragConstraints={constrained && { left: 0, right: 0 }}+ dragElastic={1}+ ref={cardElem}+ style={{ x }}+ onDrag={() => setVelocity(x.getVelocity())}+ onDragEnd={() => flyAway(500)}+ whileTap={{ scale: 1.05 }}className="cursor-grab active:cursor-grabbing flex items-center border border-gray-200 hover:border-black bg-white p-3 max-w-md rounded-md transition-[border-color]"><StatsModal />diff --git a/lib/types.ts b/lib/types.tsindex 0d4d39a998..7c5e70ccbd 100644--- a/lib/types.ts+++ b/lib/types.ts@@ -1,3 +1,8 @@+export interface SimpleLinkProps {+ key: string;+ url: string;+}+export interface LinkProps {key: string;url: string;diff --git a/package-lock.json b/package-lock.jsonindex fd4e452253..6e26855856 100644--- a/package-lock.json+++ b/package-lock.json@@ -31,6 +31,7 @@"prisma": "^4.3.1","react": "^18.1.0","react-dom": "18.1.0",+ "react-hot-toast": "^2.4.0","react-spring": "^9.5.4","react-textarea-autosize": "^8.3.4","stripe": "^10.7.0",@@ -5713,6 +5714,14 @@"node": ">=4"}},+ "node_modules/goober": {+ "version": "2.1.11",+ "resolved": "https://registry.npmjs.org/goober/-/goober-2.1.11.tgz",+ "integrity": "sha512-5SS2lmxbhqH0u9ABEWq7WPU69a4i2pYcHeCxqaNq6Cw3mnrF0ghWNM4tEGid4dKy8XNIAUbuThuozDHHKJVh3A==",+ "peerDependencies": {+ "csstype": "^3.0.10"+ }+ },"node_modules/graceful-fs": {"version": "4.2.10","resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",@@ -8351,6 +8360,8 @@},"node_modules/npm/node_modules/ansi-regex": {"version": "5.0.1",+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==","inBundle": true,"license": "MIT","engines": {@@ -8359,6 +8370,8 @@},"node_modules/npm/node_modules/ansi-styles": {"version": "4.3.0",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==","inBundle": true,"license": "MIT","dependencies": {@@ -8483,6 +8496,8 @@},"node_modules/npm/node_modules/chalk": {"version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==","inBundle": true,"license": "MIT","dependencies": {@@ -8551,6 +8566,8 @@},"node_modules/npm/node_modules/clone": {"version": "1.0.4",+ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",+ "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==","inBundle": true,"license": "MIT","engines": {@@ -8570,6 +8587,8 @@},"node_modules/npm/node_modules/color-convert": {"version": "2.0.1",+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==","inBundle": true,"license": "MIT","dependencies": {@@ -8581,6 +8600,8 @@},"node_modules/npm/node_modules/color-name": {"version": "1.1.4",+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==","inBundle": true,"license": "MIT"},@@ -8611,6 +8632,8 @@},"node_modules/npm/node_modules/concat-map": {"version": "0.0.1",+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==","inBundle": true,"license": "MIT"},@@ -8634,6 +8657,8 @@},"node_modules/npm/node_modules/debug": {"version": "4.3.4",+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==","inBundle": true,"license": "MIT","dependencies": {@@ -8663,6 +8688,8 @@},"node_modules/npm/node_modules/defaults": {"version": "1.0.3",+ "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",+ "integrity": "sha512-s82itHOnYrN0Ib8r+z7laQz3sdE+4FP3d9Q7VLO7U+KRT+CR0GsWuyHxzdAY82I7cXv0G/twrqomTJLOssO5HA==","inBundle": true,"license": "MIT","dependencies": {@@ -8701,6 +8728,8 @@},"node_modules/npm/node_modules/emoji-regex": {"version": "8.0.0",+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==","inBundle": true,"license": "MIT"},@@ -8744,6 +8773,8 @@},"node_modules/npm/node_modules/fs.realpath": {"version": "1.0.0",+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==","inBundle": true,"license": "ISC"},@@ -8792,6 +8823,8 @@},"node_modules/npm/node_modules/graceful-fs": {"version": "4.2.10",+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",+ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==","inBundle": true,"license": "ISC"},@@ -8810,6 +8843,8 @@},"node_modules/npm/node_modules/has-flag": {"version": "4.0.0",+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==","inBundle": true,"license": "MIT","engines": {@@ -8895,6 +8930,8 @@},"node_modules/npm/node_modules/imurmurhash": {"version": "0.1.4",+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==","inBundle": true,"license": "MIT","engines": {@@ -8916,6 +8953,8 @@},"node_modules/npm/node_modules/inflight": {"version": "1.0.6",+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==","inBundle": true,"license": "ISC","dependencies": {@@ -8925,6 +8964,8 @@},"node_modules/npm/node_modules/inherits": {"version": "2.0.4",+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==","inBundle": true,"license": "ISC"},@@ -8990,6 +9031,8 @@},"node_modules/npm/node_modules/is-fullwidth-code-point": {"version": "3.0.0",+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==","inBundle": true,"license": "MIT","engines": {@@ -9003,6 +9046,8 @@},"node_modules/npm/node_modules/isexe": {"version": "2.0.0",+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==","inBundle": true,"license": "ISC"},@@ -9398,6 +9443,8 @@},"node_modules/npm/node_modules/node-gyp/node_modules/brace-expansion": {"version": "1.1.11",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==","inBundle": true,"license": "MIT","dependencies": {@@ -9426,6 +9473,8 @@},"node_modules/npm/node_modules/node-gyp/node_modules/minimatch": {"version": "3.1.2",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==","inBundle": true,"license": "ISC","dependencies": {@@ -9634,6 +9683,8 @@},"node_modules/npm/node_modules/once": {"version": "1.4.0",+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==","inBundle": true,"license": "ISC","dependencies": {@@ -9711,6 +9762,8 @@},"node_modules/npm/node_modules/path-is-absolute": {"version": "1.0.1",+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==","inBundle": true,"license": "MIT","engines": {@@ -9888,6 +9941,8 @@},"node_modules/npm/node_modules/rimraf/node_modules/brace-expansion": {"version": "1.1.11",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==","inBundle": true,"license": "MIT","dependencies": {@@ -9916,6 +9971,8 @@},"node_modules/npm/node_modules/rimraf/node_modules/minimatch": {"version": "3.1.2",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==","inBundle": true,"license": "ISC","dependencies": {@@ -9927,6 +9984,8 @@},"node_modules/npm/node_modules/safe-buffer": {"version": "5.2.1",+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==","funding": [{"type": "github",@@ -9979,6 +10038,8 @@},"node_modules/npm/node_modules/set-blocking": {"version": "2.0.0",+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",+ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==","inBundle": true,"license": "ISC"},@@ -10063,6 +10124,8 @@},"node_modules/npm/node_modules/string_decoder": {"version": "1.3.0",+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",+ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==","inBundle": true,"license": "MIT","dependencies": {@@ -10071,6 +10134,8 @@},"node_modules/npm/node_modules/string-width": {"version": "4.2.3",+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==","inBundle": true,"license": "MIT","dependencies": {@@ -10084,6 +10149,8 @@},"node_modules/npm/node_modules/strip-ansi": {"version": "6.0.1",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==","inBundle": true,"license": "MIT","dependencies": {@@ -10095,6 +10162,8 @@},"node_modules/npm/node_modules/supports-color": {"version": "7.2.0",+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==","inBundle": true,"license": "MIT","dependencies": {@@ -10224,6 +10293,8 @@},"node_modules/npm/node_modules/wrappy": {"version": "1.0.2",+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==","inBundle": true,"license": "ISC"},@@ -11127,6 +11198,21 @@"react": "^18.1.0"}},+ "node_modules/react-hot-toast": {+ "version": "2.4.0",+ "resolved": "https://registry.npmjs.org/react-hot-toast/-/react-hot-toast-2.4.0.tgz",+ "integrity": "sha512-qnnVbXropKuwUpriVVosgo8QrB+IaPJCpL8oBI6Ov84uvHZ5QQcTp2qg6ku2wNfgJl6rlQXJIQU5q+5lmPOutA==",+ "dependencies": {+ "goober": "^2.1.10"+ },+ "engines": {+ "node": ">=10"+ },+ "peerDependencies": {+ "react": ">=16",+ "react-dom": ">=16"+ }+ },"node_modules/react-is": {"version": "16.13.1","resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",@@ -17598,6 +17684,12 @@"integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==","peer": true},+ "goober": {+ "version": "2.1.11",+ "resolved": "https://registry.npmjs.org/goober/-/goober-2.1.11.tgz",+ "integrity": "sha512-5SS2lmxbhqH0u9ABEWq7WPU69a4i2pYcHeCxqaNq6Cw3mnrF0ghWNM4tEGid4dKy8XNIAUbuThuozDHHKJVh3A==",+ "requires": {}+ },"graceful-fs": {"version": "4.2.10","resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",@@ -19607,10 +19699,14 @@},"ansi-regex": {"version": "5.0.1",+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==","bundled": true},"ansi-styles": {"version": "4.3.0",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==","bundled": true,"requires": {"color-convert": "^2.0.1"@@ -19704,6 +19800,8 @@},"chalk": {"version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==","bundled": true,"requires": {"ansi-styles": "^4.1.0",@@ -19743,6 +19841,8 @@},"clone": {"version": "1.0.4",+ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",+ "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==","bundled": true},"cmd-shim": {@@ -19754,6 +19854,8 @@},"color-convert": {"version": "2.0.1",+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==","bundled": true,"requires": {"color-name": "~1.1.4"@@ -19761,6 +19863,8 @@},"color-name": {"version": "1.1.4",+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==","bundled": true},"color-support": {@@ -19781,6 +19885,8 @@},"concat-map": {"version": "0.0.1",+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==","bundled": true},"console-control-strings": {@@ -19795,6 +19901,8 @@},"debug": {"version": "4.3.4",+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==","bundled": true,"requires": {"ms": "2.1.2"@@ -19812,6 +19920,8 @@},"defaults": {"version": "1.0.3",+ "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",+ "integrity": "sha512-s82itHOnYrN0Ib8r+z7laQz3sdE+4FP3d9Q7VLO7U+KRT+CR0GsWuyHxzdAY82I7cXv0G/twrqomTJLOssO5HA==","bundled": true,"requires": {"clone": "^1.0.2"@@ -19839,6 +19949,8 @@},"emoji-regex": {"version": "8.0.0",+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==","bundled": true},"encoding": {@@ -19870,6 +19982,8 @@},"fs.realpath": {"version": "1.0.0",+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==","bundled": true},"function-bind": {@@ -19905,6 +20019,8 @@},"graceful-fs": {"version": "4.2.10",+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",+ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==","bundled": true},"has": {@@ -19918,6 +20034,8 @@},"has-flag": {"version": "4.0.0",+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==","bundled": true},"has-unicode": {@@ -19976,6 +20094,8 @@},"imurmurhash": {"version": "0.1.4",+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==","bundled": true},"indent-string": {@@ -19988,6 +20108,8 @@},"inflight": {"version": "1.0.6",+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==","bundled": true,"requires": {"once": "^1.3.0",@@ -19996,6 +20118,8 @@},"inherits": {"version": "2.0.4",+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==","bundled": true},"ini": {@@ -20039,6 +20163,8 @@},"is-fullwidth-code-point": {"version": "3.0.0",+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==","bundled": true},"is-lambda": {@@ -20047,6 +20173,8 @@},"isexe": {"version": "2.0.0",+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==","bundled": true},"json-parse-even-better-errors": {@@ -20319,6 +20447,8 @@"dependencies": {"brace-expansion": {"version": "1.1.11",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==","bundled": true,"requires": {"balanced-match": "^1.0.0",@@ -20339,6 +20469,8 @@},"minimatch": {"version": "3.1.2",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==","bundled": true,"requires": {"brace-expansion": "^1.1.7"@@ -20480,6 +20612,8 @@},"once": {"version": "1.4.0",+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==","bundled": true,"requires": {"wrappy": "1"@@ -20534,6 +20668,8 @@},"path-is-absolute": {"version": "1.0.1",+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==","bundled": true},"postcss-selector-parser": {@@ -20648,6 +20784,8 @@"dependencies": {"brace-expansion": {"version": "1.1.11",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==","bundled": true,"requires": {"balanced-match": "^1.0.0",@@ -20668,6 +20806,8 @@},"minimatch": {"version": "3.1.2",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==","bundled": true,"requires": {"brace-expansion": "^1.1.7"@@ -20677,6 +20817,8 @@},"safe-buffer": {"version": "5.2.1",+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==","bundled": true},"safer-buffer": {@@ -20704,6 +20846,8 @@},"set-blocking": {"version": "2.0.0",+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",+ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==","bundled": true},"signal-exit": {@@ -20764,6 +20908,8 @@},"string_decoder": {"version": "1.3.0",+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",+ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==","bundled": true,"requires": {"safe-buffer": "~5.2.0"@@ -20771,6 +20917,8 @@},"string-width": {"version": "4.2.3",+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==","bundled": true,"requires": {"emoji-regex": "^8.0.0",@@ -20780,6 +20928,8 @@},"strip-ansi": {"version": "6.0.1",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==","bundled": true,"requires": {"ansi-regex": "^5.0.1"@@ -20787,6 +20937,8 @@},"supports-color": {"version": "7.2.0",+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==","bundled": true,"requires": {"has-flag": "^4.0.0"@@ -20878,6 +21030,8 @@},"wrappy": {"version": "1.0.2",+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==","bundled": true},"write-file-atomic": {@@ -21505,6 +21659,14 @@"scheduler": "^0.22.0"}},+ "react-hot-toast": {+ "version": "2.4.0",+ "resolved": "https://registry.npmjs.org/react-hot-toast/-/react-hot-toast-2.4.0.tgz",+ "integrity": "sha512-qnnVbXropKuwUpriVVosgo8QrB+IaPJCpL8oBI6Ov84uvHZ5QQcTp2qg6ku2wNfgJl6rlQXJIQU5q+5lmPOutA==",+ "requires": {+ "goober": "^2.1.10"+ }+ },"react-is": {"version": "16.13.1","resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",diff --git a/package.json b/package.jsonindex 5eec9b710e..8fd507757b 100644--- a/package.json+++ b/package.json@@ -32,6 +32,7 @@"prisma": "^4.3.1","react": "^18.1.0","react-dom": "18.1.0",+ "react-hot-toast": "^2.4.0","react-spring": "^9.5.4","react-textarea-autosize": "^8.3.4","stripe": "^10.7.0",diff --git a/pages/index.tsx b/pages/index.tsxindex a1aeae1dbc..25e9525bc3 100644--- a/pages/index.tsx+++ b/pages/index.tsx@@ -11,10 +11,11 @@ import {CheckCircleFill,} from "@/components/shared/icons";import { motion, AnimatePresence } from "framer-motion";-import { LinkProps } from "@/lib/types";+import { SimpleLinkProps } from "@/lib/types";import MaxWidthWrapper from "@/components/shared/max-width-wrapper";import Globe from "@/components/home/globe";import Tooltip, { TooltipContent } from "@/components/shared/tooltip";+import { Toaster } from "react-hot-toast";export default function Home() {return (@@ -77,9 +78,11 @@ const Hero = () => {const Demo = () => {const [saving, setSaving] = useState(false);const [url, setUrl] = useState("");- const [hashes, setHashes] = useLocalStorage<LinkProps[]>("hashes", []);+ const [hashes, setHashes] = useLocalStorage<SimpleLinkProps[]>("hashes", []);+return (<div className="max-w-md mx-auto sm:px-0 px-2.5">+ <Toaster /><formonSubmit={async (e) => {e.preventDefault();@@ -99,33 +102,38 @@ const Demo = () => {});}}>- <div className="relative flex items-center">- <input- type="url"- placeholder="Shorten your link"- value={url}- onInput={(e) => {- setUrl((e.target as HTMLInputElement).value);- }}- required- className="peer shadow-sm focus:outline-none focus:ring-0 bg-white border focus:border-black block w-full p-2 text-sm border-gray-200 rounded-md pl-3 pr-12"- />- {hashes.length >= 4 ? (- <Tooltip- content={- <TooltipContent- title="Maximum number of links reached. Swipe to delete existing links or+ {hashes.length >= 3 ? (+ <Tooltip+ content={+ <TooltipContent+ title="Maximum number of links reached. Swipe to delete existing links orcreate a free account."- cta="Start For Free"- ctaLink="https://app.dub.sh"- />- }- >+ cta="Start For Free"+ ctaLink="https://app.dub.sh"+ />+ }+ >+ <div className="relative flex items-center">+ <div className="shadow-sm bg-white border focus:border-black block w-full p-2 text-sm text-gray-400 border-gray-200 rounded-md pl-3 pr-12">+ Shorten your link+ </div><div className="cursor-not-allowed absolute inset-y-0 right-0 w-10 flex justify-center items-center my-1.5 mr-1.5 border border-gray-200 rounded text-sm font-sans font-medium text-gray-400"><p>↵</p></div>- </Tooltip>- ) : (+ </div>+ </Tooltip>+ ) : (+ <div className="relative flex items-center">+ <input+ type="url"+ placeholder="Shorten your link"+ value={url}+ onInput={(e) => {+ setUrl((e.target as HTMLInputElement).value);+ }}+ required+ className="peer shadow-sm focus:outline-none focus:ring-0 bg-white border focus:border-black block w-full p-2 text-sm border-gray-200 rounded-md pl-3 pr-12"+ /><buttontype="submit"disabled={saving}@@ -137,8 +145,8 @@ const Demo = () => {>{saving ? <LoadingDots color="#e5e7eb" /> : <p>↵</p>}</button>- )}- </div>+ </div>+ )}</form><motion.ul@@ -160,11 +168,15 @@ const Demo = () => {_key="github"url={"https://github.com/steven-tey/dub"}/>- <AnimatePresence>- {hashes.map(({ key, url }) => (- <LinkCard key={key} _key={key} url={url} />- ))}- </AnimatePresence>+ {hashes.map(({ key, url }) => (+ <LinkCard+ key={key}+ _key={key}+ url={url}+ hashes={hashes}+ setHashes={setHashes}+ />+ ))}{Array.from({ length: 3 - hashes.length }).map((_, i) => (<PlaceholderCard key={i} />))}diff --git a/yarn.lock b/yarn.lockindex 426d53b48d..2371150921 100644--- a/yarn.lock+++ b/yarn.lock@@ -3021,7 +3021,7 @@"resolved" "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz""version" "3.0.0"-"csstype@^3.0.2":+"csstype@^3.0.10", "csstype@^3.0.2":"integrity" "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==""resolved" "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz""version" "3.1.0"@@ -3663,6 +3663,11 @@"resolved" "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz""version" "11.12.0"+"goober@^2.1.10":+ "integrity" "sha512-5SS2lmxbhqH0u9ABEWq7WPU69a4i2pYcHeCxqaNq6Cw3mnrF0ghWNM4tEGid4dKy8XNIAUbuThuozDHHKJVh3A=="+ "resolved" "https://registry.npmjs.org/goober/-/goober-2.1.11.tgz"+ "version" "2.1.11"+"graceful-fs@^4.1.11", "graceful-fs@^4.1.2", "graceful-fs@^4.1.3", "graceful-fs@^4.1.6", "graceful-fs@^4.1.9", "graceful-fs@^4.2.0", "graceful-fs@^4.2.10", "graceful-fs@^4.2.4", "graceful-fs@^4.2.6", "graceful-fs@^4.2.9":"integrity" "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==""resolved" "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz"@@ -5929,7 +5934,7 @@"shell-quote" "^1.6.1""ws" "^7"-"react-dom@^16 || ^17 || ^18", "react-dom@^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0", "react-dom@^16.8 || ^17.0 || ^18.0", "react-dom@^16.8.0 || ^17.0.0 || ^18.0.0", "react-dom@^16.8.0-0 || ^17.0.0-0 || ^18.0.0-0", "react-dom@^17.0.2 || ^18", "react-dom@^17.0.2 || ^18.0.0-0", "react-dom@^18.0.0", "react-dom@>=16.13", "react-dom@>=16.8", "react-dom@>=16.8.0", "react-dom@>=18.0", "[email protected]", "[email protected]":+"react-dom@^16 || ^17 || ^18", "react-dom@^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0", "react-dom@^16.8 || ^17.0 || ^18.0", "react-dom@^16.8.0 || ^17.0.0 || ^18.0.0", "react-dom@^16.8.0-0 || ^17.0.0-0 || ^18.0.0-0", "react-dom@^17.0.2 || ^18", "react-dom@^17.0.2 || ^18.0.0-0", "react-dom@^18.0.0", "react-dom@>=16", "react-dom@>=16.13", "react-dom@>=16.8", "react-dom@>=16.8.0", "react-dom@>=18.0", "[email protected]", "[email protected]":"integrity" "sha512-fU1Txz7Budmvamp7bshe4Zi32d0ll7ect+ccxNu9FlObT605GOEB8BfO4tmRJ39R5Zj831VCpvQ05QPBW5yb+w==""resolved" "https://registry.npmjs.org/react-dom/-/react-dom-18.1.0.tgz""version" "18.1.0"@@ -5937,6 +5942,13 @@"loose-envify" "^1.1.0""scheduler" "^0.22.0"+"react-hot-toast@^2.4.0":+ "integrity" "sha512-qnnVbXropKuwUpriVVosgo8QrB+IaPJCpL8oBI6Ov84uvHZ5QQcTp2qg6ku2wNfgJl6rlQXJIQU5q+5lmPOutA=="+ "resolved" "https://registry.npmjs.org/react-hot-toast/-/react-hot-toast-2.4.0.tgz"+ "version" "2.4.0"+ dependencies:+ "goober" "^2.1.10"+"react-is@^16.12.0 || ^17.0.0 || ^18.0.0", "react-is@^16.13.1":"integrity" "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==""resolved" "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz"@@ -6079,7 +6091,7 @@"resize-observer-polyfill" "^1.5.1""scheduler" "0.13.3"-"react@^16 || ^17 || ^18", "react@^16.0.0", "react@^16.0.0 || ^17.0.0 || ^18.0.0", "react@^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0", "react@^16.11.0 || ^17.0.0 || ^18.0.0", "react@^16.3.0-0 || ^17.0.0-0 || ^18.0.0-0", "react@^16.8 || ^17.0 || ^18.0", "react@^16.8.0 || >=17.0.0 || >=18.0.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0", "react@^16.8.0-0 || ^17.0.0-0 || ^18.0.0-0", "react@^17.0.2 || ^18", "react@^17.0.2 || ^18.0.0-0", "react@^18.0.0", "react@^18.1.0", "react@>= 16.8.0 || 17.x.x || ^18.0.0-0", "react@>=16.13", "react@>=16.8", "react@>=16.8.0", "react@>=17.0", "react@>=18.0", "[email protected]", "[email protected]":+"react@^16 || ^17 || ^18", "react@^16.0.0", "react@^16.0.0 || ^17.0.0 || ^18.0.0", "react@^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0", "react@^16.11.0 || ^17.0.0 || ^18.0.0", "react@^16.3.0-0 || ^17.0.0-0 || ^18.0.0-0", "react@^16.8 || ^17.0 || ^18.0", "react@^16.8.0 || >=17.0.0 || >=18.0.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0", "react@^16.8.0-0 || ^17.0.0-0 || ^18.0.0-0", "react@^17.0.2 || ^18", "react@^17.0.2 || ^18.0.0-0", "react@^18.0.0", "react@^18.1.0", "react@>= 16.8.0 || 17.x.x || ^18.0.0-0", "react@>=16", "react@>=16.13", "react@>=16.8", "react@>=16.8.0", "react@>=17.0", "react@>=18.0", "[email protected]", "[email protected]":"integrity" "sha512-4oL8ivCz5ZEPyclFQXaNksK3adutVS8l2xzZU0cqEFrE9Sb7fC0EFK5uEk74wIreL1DERyjvsU915j1pcT2uEQ==""resolved" "https://registry.npmjs.org/react/-/react-18.1.0.tgz""version" "18.1.0"