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 position error

Steven Teyb1bc473fb86b
diff --git a/components/app/modals/stats-modal.tsx b/components/app/modals/stats-modal.tsx
index affbcd4730..d80a28163f 100644
--- a/components/app/modals/stats-modal.tsx
+++ b/components/app/modals/stats-modal.tsx
@@ -41,7 +41,7 @@ function StatsModalHelper({
align-middle shadow-xl scrollbar-hide sm:rounded-2xl sm:border sm:border-gray-200"
>
<button
- className="group sticky top-4 z-30 float-right m-4 hidden rounded-full p-3 transition-all duration-75 hover:bg-gray-100 focus:outline-none active:scale-75 sm:block"
+ className="group sticky top-4 right-4 z-30 float-right hidden rounded-full p-3 transition-all duration-75 hover:bg-gray-100 focus:outline-none active:scale-75 sm:block"
autoFocus={false}
onClick={() => {
router.push("/", undefined, { scroll: false });
diff --git a/components/stats/toggle.tsx b/components/stats/toggle.tsx
index 8d28f0ba9f..c93c8fb8ec 100644
--- a/components/stats/toggle.tsx
+++ b/components/stats/toggle.tsx
@@ -15,10 +15,8 @@ import IconMenu from "@/components/shared/icon-menu";
import Popover from "@/components/shared/popover";
import useSWR, { mutate } from "swr";
import { fetcher } from "@/lib/utils";
-import { useSession } from "next-auth/react";
import { toast } from "react-hot-toast";
import Switch from "../shared/switch";
-import Link from "next/link";
import useEndpoint from "@/lib/hooks/use-endpoint";
export default function Toggle({
@@ -43,8 +41,6 @@ export default function Toggle({
return INTERVALS.find((s) => s.slug === interval) || INTERVALS[1];
}, [interval]);
- const { data: session } = useSession();
-
return (
<div
className={`z-20 mb-5 ${
@@ -62,7 +58,7 @@ export default function Toggle({
<ExpandingArrow className="h-5 w-5" />
</a>
<div className="flex items-center">
- {session && <SharePopover domain={domain} />}
+ {pageType !== "stats" && <SharePopover domain={domain} />}
<Popover
content={
<div className="w-full p-2 md:w-48">