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.

Add back "X" button, some minor style changes

Steven Teyc4c65e6bc2bb
diff --git a/app/ui/home/logos.tsx b/app/ui/home/logos.tsx
index 9ac1ed0096..57a417897f 100644
--- a/app/ui/home/logos.tsx
+++ b/app/ui/home/logos.tsx
@@ -38,7 +38,7 @@ const logos = [
export default function Logos() {
return (
<div className="mt-20">
- <p className="text-center text-lg text-gray-600">
+ <p className="mx-auto max-w-sm text-center text-gray-600 sm:max-w-xl sm:text-lg">
Giving superpowers to marketing teams at world-class companies
</p>
<div className="mx-auto mt-8 grid w-full max-w-screen-lg grid-cols-2 items-center gap-5 px-5 sm:grid-cols-6 sm:px-0">
diff --git a/app/ui/stats/index.tsx b/app/ui/stats/index.tsx
index 88aab9072a..998ca4ace7 100644
--- a/app/ui/stats/index.tsx
+++ b/app/ui/stats/index.tsx
@@ -9,7 +9,12 @@
*/
import { createContext, useCallback, useMemo, useRef, useState } from "react";
-import { useParams, usePathname, useSearchParams } from "next/navigation";
+import {
+ useParams,
+ usePathname,
+ useRouter,
+ useSearchParams,
+} from "next/navigation";
import Clicks from "./clicks";
import Devices from "./devices";
import Feedback from "./feedback";
@@ -17,6 +22,7 @@ import Locations from "./locations";
import Referer from "./referer";
import Toggle from "./toggle";
import useScroll from "#/lib/hooks/use-scroll";
+import { X } from "lucide-react";
export const StatsContext = createContext<{
basePath: string;
@@ -48,6 +54,7 @@ export default function Stats({
const params = useParams();
const searchParams = useSearchParams() || new URLSearchParams();
const pathname = usePathname();
+ const router = useRouter();
let {
slug,
@@ -108,6 +115,15 @@ export default function Stats({
modal, // whether or not this is a modal
}}
>
+ {modal && (
+ <button
+ className="group sticky right-4 top-4 z-30 float-right hidden rounded-full p-3 transition-all duration-75 hover:bg-gray-100 focus:outline-none active:scale-75 md:block"
+ autoFocus={false}
+ onClick={() => router.back()}
+ >
+ <X className="h-6 w-6" />
+ </button>
+ )}
<div className="bg-gray-50 py-10">
<Toggle />
<div className="mx-auto grid max-w-4xl gap-5">