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.

fix ts issues

Steven Tey0a090ecb1c02
diff --git a/apps/web/ui/stats/devices.tsx b/apps/web/ui/stats/devices.tsx
index a434c18710..e52ac7775d 100644
--- a/apps/web/ui/stats/devices.tsx
+++ b/apps/web/ui/stats/devices.tsx
@@ -11,7 +11,7 @@ import DeviceIcon from "./device-icon";
export default function Devices() {
const [tab, setTab] = useState<DeviceTabs>("device");
- const { baseApiPath, queryString, modal } = useContext(StatsContext);
+ const { baseApiPath, queryString } = useContext(StatsContext);
const { data } = useSWR<
({
@@ -80,7 +80,7 @@ export default function Devices() {
<LoadingSpinner />
</div>
)}
- {!modal && data && data.length > 9 && (
+ {data && data.length > 9 && (
<button
onClick={() => setShowModal(true)}
className="absolute inset-x-0 bottom-4 z-10 mx-auto flex w-full items-center justify-center space-x-2 rounded-md bg-gradient-to-b from-transparent to-white py-2 text-gray-500 transition-all hover:text-gray-800 active:scale-95"
diff --git a/apps/web/ui/stats/locations.tsx b/apps/web/ui/stats/locations.tsx
index dc23806205..02b975c1d2 100644
--- a/apps/web/ui/stats/locations.tsx
+++ b/apps/web/ui/stats/locations.tsx
@@ -10,7 +10,7 @@ import BarList from "./bar-list";
export default function Locations() {
const [tab, setTab] = useState<LocationTabs>("country");
- const { baseApiPath, queryString, modal } = useContext(StatsContext);
+ const { baseApiPath, queryString } = useContext(StatsContext);
const { data } = useSWR<{ country: string; city: string; clicks: number }[]>(
`${baseApiPath}/${tab}?${queryString}`,
@@ -84,7 +84,7 @@ export default function Locations() {
<LoadingSpinner />
</div>
)}
- {!modal && data && data.length > 9 && (
+ {data && data.length > 9 && (
<button
onClick={() => setShowModal(true)}
className="absolute inset-x-0 bottom-4 z-10 mx-auto flex w-full items-center justify-center space-x-2 rounded-md bg-gradient-to-b from-transparent to-white py-2 text-gray-500 transition-all hover:text-gray-800 active:scale-95"
diff --git a/apps/web/ui/stats/referer.tsx b/apps/web/ui/stats/referer.tsx
index d2fc40fcc6..607fb35f4f 100644
--- a/apps/web/ui/stats/referer.tsx
+++ b/apps/web/ui/stats/referer.tsx
@@ -8,8 +8,7 @@ import { StatsContext } from ".";
import BarList from "./bar-list";
export default function Referer() {
- const { baseApiPath, queryString, totalClicks, modal } =
- useContext(StatsContext);
+ const { baseApiPath, queryString } = useContext(StatsContext);
const { data } = useSWR<{ referer: string; clicks: number }[]>(
`${baseApiPath}/referer?${queryString}`,
@@ -82,7 +81,7 @@ export default function Referer() {
<LoadingSpinner />
</div>
)}
- {!modal && data && data.length > 9 && (
+ {data && data.length > 9 && (
<button
onClick={() => setShowModal(true)}
className="absolute inset-x-0 bottom-4 z-10 mx-auto flex w-full items-center justify-center space-x-2 rounded-md bg-gradient-to-b from-transparent to-white py-2 text-gray-500 transition-all hover:text-gray-800 active:scale-95"