Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿

feat: include region in event actions logEvent integration

yoginth.com 84ba2746 75f68b4a

verified
+6 -2
+4 -2
apps/api/src/routes/events.ts
··· 9 9 const body = await ctx.req.json(); 10 10 const event = body.event?.trim(); 11 11 const address = ctx.get("account") ?? zeroAddress; 12 - const country = getIpData(ctx).countryCode; 12 + const ipData = getIpData(ctx); 13 + const country = ipData.countryCode; 14 + const region = ipData.region; 13 15 14 16 if (!event) { 15 17 ctx.status(400); ··· 17 19 } 18 20 19 21 await fetch("https://yoginth.com/api/hey/events", { 20 - body: JSON.stringify({ address, country, event }), 22 + body: JSON.stringify({ address, country, event, region }), 21 23 headers: { 22 24 accept: "application/json", 23 25 "content-type": "application/json"
+2
apps/web/src/hooks/useCopyToClipboard.tsx
··· 1 1 import { useCallback } from "react"; 2 2 import { toast } from "sonner"; 3 + import logEvent from "@/helpers/logEvent"; 3 4 4 5 const useCopyToClipboard = ( 5 6 text: string, ··· 14 15 15 16 await navigator.clipboard.writeText(text); 16 17 toast.success(successMessage); 18 + void logEvent("Copy to Clipboard"); 17 19 } catch { 18 20 toast.error(errorMessage); 19 21 }