The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fixed jittery globe bug
Steven Tey747de662dfa1
diff --git a/components/home/globe.tsx b/components/home/globe.tsxindex 58bcde4c9f..4598399acf 100644--- a/components/home/globe.tsx+++ b/components/home/globe.tsx@@ -27,7 +27,7 @@ export default function Globe({ domain }: { domain?: string }) {}}, [isVisible]);- const [webglSupported, setWebglSupported] = useState(false);+ const [webglSupported, setWebglSupported] = useState(true);const { data: markers } = useSWR<MarkerProps[]>(`/api/edge/coordinates${domain ? `?domain=${domain}` : ""}`,@@ -40,12 +40,10 @@ export default function Globe({ domain }: { domain?: string }) {const ctx =canvas.getContext("webgl") || canvas.getContext("experimental-webgl");(ctx as any).getSupportedExtensions();- setWebglSupported(true);} catch (e) {// WebGL isn't properly supported- console.log(- "WebGL not supported, hiding globe animation and showing fallback video...",- );+ setWebglSupported(false);+ console.log("WebGL not supported, hiding globe animation...");return;}}, []);@@ -54,9 +52,7 @@ export default function Globe({ domain }: { domain?: string }) {<divref={divRef}className={`${- webglSupported && showGlobe- ? "min-h-[500px] sm:min-h-[1000px]"- : "min-h-[50px]"+ webglSupported ? "min-h-[500px] sm:min-h-[1000px]" : "min-h-[50px]"} h-full`}>{webglSupported && showGlobe && (diff --git a/components/home/link-card.tsx b/components/home/link-card.tsxindex 542ffc174d..9b800d11ee 100644--- a/components/home/link-card.tsx+++ b/components/home/link-card.tsx@@ -78,11 +78,6 @@ export default function LinkCard({}};- const sendSuccessToast = useDebouncedCallback(- () => toast.success("Link deleted."),- 100,- );-useEffect(() => {const unsubscribeX = x.onChange(() => {if (cardElem.current) {