Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

revert the accidental changes

Kiran Kf49529b10883
diff --git a/apps/web/lib/middleware/link.ts b/apps/web/lib/middleware/link.ts
index 95022051d6..39cd24e4b3 100644
--- a/apps/web/lib/middleware/link.ts
+++ b/apps/web/lib/middleware/link.ts
@@ -182,13 +182,13 @@ export default async function LinkMiddleware(
);
}
- const isMachine = detectBot(req);
+ const isBot = detectBot(req);
const { country } =
process.env.VERCEL === "1" && req.geo ? req.geo : LOCALHOST_GEO_DATA;
// rewrite to proxy page (/proxy/[domain]/[key]) if it's a bot and proxy is enabled
- if (isMachine && proxy) {
+ if (isBot && proxy) {
return NextResponse.rewrite(
new URL(`/proxy/${domain}/${encodeURIComponent(key)}`, req.url),
{
diff --git a/apps/web/lib/tinybird/record-click.ts b/apps/web/lib/tinybird/record-click.ts
index cb996351a3..ce07f7a70b 100644
--- a/apps/web/lib/tinybird/record-click.ts
+++ b/apps/web/lib/tinybird/record-click.ts
@@ -28,8 +28,8 @@ export async function recordClick({
url?: string;
root?: boolean;
}) {
- const isMachine = detectBot(req);
- if (isMachine) {
+ const isBot = detectBot(req);
+ if (isBot) {
return null; // don't record clicks from bots
}
const isQr = detectQr(req);
@@ -85,7 +85,7 @@ export async function recordClick({
os_version: ua.os.version || "Unknown",
cpu_architecture: ua.cpu?.architecture || "Unknown",
ua: ua.ua || "Unknown",
- bot: ua.isMachine,
+ bot: ua.isBot,
qr: isQr,
referer: referer
? getDomainWithoutWWW(referer) || "(direct)"
diff --git a/apps/web/ui/charts/x-axis.tsx b/apps/web/ui/charts/x-axis.tsx
index b34938d059..71df0e333f 100644
--- a/apps/web/ui/charts/x-axis.tsx
+++ b/apps/web/ui/charts/x-axis.tsx
@@ -1,4 +1,4 @@
-import { AxisMachinetom } from "@visx/axis";
+import { AxisBottom } from "@visx/axis";
import { Group } from "@visx/group";
import { Line } from "@visx/shape";
import { useMemo } from "react";
@@ -54,7 +54,7 @@ export default function XAxis({
return (
<>
- <AxisMachinetom
+ <AxisBottom
left={margin.left}
top={margin.top + height}
scale={xScale}