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.

small tweaks

Steven Tey955ce50e135e
diff --git a/apps/web/ui/layout/sidebar/user-dropdown.tsx b/apps/web/ui/layout/sidebar/user-dropdown.tsx
index d63ca2fefc..fa8c36ee0b 100644
--- a/apps/web/ui/layout/sidebar/user-dropdown.tsx
+++ b/apps/web/ui/layout/sidebar/user-dropdown.tsx
@@ -1,30 +1,16 @@
"use client";
-import { Avatar, Badge, Gear, Icon, Popover } from "@dub/ui";
+import { Avatar, Icon, Popover, User } from "@dub/ui";
import { cn } from "@dub/utils";
-import Cookies from "js-cookie";
-import { Edit3, LogOut } from "lucide-react";
+import { LogOut } from "lucide-react";
import { signOut, useSession } from "next-auth/react";
import Link from "next/link";
-import {
- ComponentPropsWithoutRef,
- ElementType,
- useEffect,
- useState,
-} from "react";
+import { ComponentPropsWithoutRef, ElementType, useState } from "react";
export default function UserDropdown() {
const { data: session } = useSession();
const [openPopover, setOpenPopover] = useState(false);
- const [unreadChangelogs, setUnreadChangelogs] = useState(0);
- useEffect(() => {
- const lastReadChangelog = Cookies.get("lastReadChangelog");
- if (!lastReadChangelog) {
- setUnreadChangelogs(2);
- }
- }, []);
-
return (
<Popover
content={
@@ -47,27 +33,10 @@ export default function UserDropdown() {
<UserOption
as={Link}
label="Account"
- icon={Gear}
+ icon={User}
href="/account/settings"
onClick={() => setOpenPopover(false)}
/>
- <UserOption
- as={Link}
- label="Changelog"
- icon={Edit3}
- href="https://dub.co/changelog"
- target="_blank"
- onClick={() => {
- Cookies.set("lastReadChangelog", new Date().toISOString());
- setOpenPopover(false);
- }}
- >
- {unreadChangelogs > 0 && (
- <div className="flex grow justify-end">
- <Badge variant="blue">{unreadChangelogs}</Badge>
- </div>
- )}
- </UserOption>
<UserOption
as="button"
type="button"
@@ -100,9 +69,6 @@ export default function UserDropdown() {
) : (
<div className="size-6 animate-pulse rounded-full bg-gray-100 sm:size-6" />
)}
- {unreadChangelogs > 0 && (
- <div className="absolute -bottom-0.5 -right-0.5 size-3 rounded-full border-2 border-white bg-blue-500" />
- )}
</button>
</Popover>
);
diff --git a/apps/web/ui/links/link-controls.tsx b/apps/web/ui/links/link-controls.tsx
index a65bc33459..96ff0e353d 100644
--- a/apps/web/ui/links/link-controls.tsx
+++ b/apps/web/ui/links/link-controls.tsx
@@ -89,7 +89,7 @@ export function LinkControls({ link }: { link: ResponseLink }) {
}).then(async () => {
await mutate(
(key) =>
- typeof key === "string" && key.startsWith("/api/admin/links/ban"),
+ typeof key === "string" && key.startsWith("/api/admin/links"),
undefined,
{ revalidate: true },
);
diff --git a/apps/web/ui/modals/delete-link-modal.tsx b/apps/web/ui/modals/delete-link-modal.tsx
index 9d35f604bc..c73664bcc3 100644
--- a/apps/web/ui/modals/delete-link-modal.tsx
+++ b/apps/web/ui/modals/delete-link-modal.tsx
@@ -66,9 +66,6 @@ function DeleteLinkModalInner({
setDeleting(true);
fetch(`/api/links/${props.id}?workspaceId=${id}`, {
method: "DELETE",
- headers: {
- "Content-Type": "application/json",
- },
}).then(async (res) => {
if (res.status === 200) {
await mutate(