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 Tey0fc6126c94b6
diff --git a/app/ui/home/hero.tsx b/app/ui/home/hero.tsx
index 830c0ed563..e0fbdfda2d 100644
--- a/app/ui/home/hero.tsx
+++ b/app/ui/home/hero.tsx
@@ -1,16 +1,21 @@
-import { Github, Twitter } from "@/components/shared/icons";
+import { allChangelogPosts } from "contentlayer/generated";
+import { Github } from "@/components/shared/icons";
import Link from "next/link";
import { ExpandingArrow } from "../icons";
const Hero = () => {
+ const latestChangelog = allChangelogPosts.sort(
+ (a, b) => Number(new Date(b.publishedAt)) - Number(new Date(a.publishedAt)),
+ )[0];
+
return (
<div className="mx-auto mb-10 mt-12 max-w-md px-2.5 text-center sm:max-w-lg sm:px-0">
<Link
- href="/changelog/monthly-summaries"
+ href={`/changelog/${latestChangelog.slug}`}
className="group mx-auto flex max-w-fit items-center justify-center space-x-2 overflow-hidden rounded-full border border-gray-200 bg-white px-7 py-2 shadow-[inset_10px_-50px_94px_0_rgb(199,199,199,0.1)] backdrop-blur transition-all hover:border-gray-300 hover:bg-white/50"
>
<p className="text-sm font-semibold text-gray-700">
- Introducing Monthly Summaries
+ {latestChangelog.title}
</p>
<ExpandingArrow className="-ml-1 h-3.5 w-3.5" />
</Link>
diff --git a/app/ui/home/link-card.tsx b/app/ui/home/link-card.tsx
index 2eeff5cf50..07bca49767 100644
--- a/app/ui/home/link-card.tsx
+++ b/app/ui/home/link-card.tsx
@@ -165,10 +165,10 @@ export default function LinkCard({
<CopyButton url={linkConstructor({ key })} />
<button
onClick={() => setShowLinkQRModal(true)}
- className="group rounded-full bg-gray-100 p-1.5 transition-all duration-75 hover:scale-105 hover:bg-blue-100 active:scale-95"
+ className="group rounded-full bg-gray-100 p-1.5 transition-all duration-75 hover:scale-105 hover:bg-blue-100 focus:outline-none active:scale-95"
>
<span className="sr-only">Copy</span>
- <QrCode className="text-gray-700 transition-all group-hover:text-blue-800" />
+ <QrCode className="h-4 w-4 text-gray-700 transition-all group-hover:text-blue-800" />
</button>
<Link
href={`/stats/${encodeURI(key)}`}
@@ -191,7 +191,7 @@ export default function LinkCard({
<button
type="button"
onClick={() => setShowAddEditLinkModal(true)}
- className="rounded-md px-1 py-2 transition-all duration-75 hover:bg-gray-100 active:bg-gray-200"
+ className="rounded-md px-1 py-2 transition-all duration-75 hover:bg-gray-100 focus:outline-none active:bg-gray-200"
>
<span className="sr-only">Edit</span>
<ThreeDots className="h-5 w-5 text-gray-500" />
diff --git a/app/ui/modals/link-qr-modal.tsx b/app/ui/modals/link-qr-modal.tsx
index e6840b56e8..fbdbc18db8 100644
--- a/app/ui/modals/link-qr-modal.tsx
+++ b/app/ui/modals/link-qr-modal.tsx
@@ -10,7 +10,8 @@ import {
} from "react";
import { HexColorInput, HexColorPicker } from "react-colorful";
import BlurImage from "#/ui/blur-image";
-import { ChevronRight, Clipboard, Logo } from "@/components/shared/icons";
+import { Clipboard } from "@/components/shared/icons";
+import { ChevronRight } from "lucide-react";
import Modal from "#/ui/modal";
import Switch from "#/ui/switch";
import Tooltip, { TooltipContent } from "#/ui/tooltip";
@@ -106,17 +107,13 @@ function LinkQRModalHelper({
<Modal showModal={showLinkQRModal} setShowModal={setShowLinkQRModal}>
<div className="inline-block w-full transform bg-white align-middle shadow-xl transition-all sm:max-w-md sm:rounded-2xl sm:border sm:border-gray-200">
<div className="flex flex-col items-center justify-center space-y-3 border-b border-gray-200 px-4 py-4 pt-8 sm:px-16">
- {avatarUrl ? (
- <BlurImage
- src={avatarUrl}
- alt={apexDomain}
- className="h-10 w-10 rounded-full"
- width={40}
- height={40}
- />
- ) : (
- <Logo className="h-10 w-10" />
- )}
+ <BlurImage
+ src={avatarUrl || "/_static/logo.png"}
+ alt={apexDomain}
+ className="h-10 w-10 rounded-full"
+ width={40}
+ height={40}
+ />
<h3 className="text-lg font-medium">Download QR Code</h3>
</div>
diff --git a/app/ui/stats/toggle.tsx b/app/ui/stats/toggle.tsx
index 96fb8ce5d5..44b65d1da4 100644
--- a/app/ui/stats/toggle.tsx
+++ b/app/ui/stats/toggle.tsx
@@ -1,11 +1,6 @@
import { useContext, useMemo, useState } from "react";
-import {
- Calendar,
- ChevronDown,
- Copy,
- Share,
- Tick,
-} from "@/components/shared/icons";
+import { Copy, Tick } from "@/components/shared/icons";
+import { Calendar, ChevronDown, Share2, Lock } from "lucide-react";
import { ExpandingArrow } from "#/ui/icons";
import { INTERVALS } from "#/lib/stats";
import { linkConstructor } from "#/lib/utils";
@@ -21,7 +16,6 @@ import useScroll from "#/lib/hooks/use-scroll";
import Tooltip, { TooltipContent } from "../tooltip";
import useProject from "#/lib/hooks/use-project";
import { useParams } from "next/navigation";
-import { Lock } from "lucide-react";
export default function Toggle() {
const { slug: projectSlug } = useParams() as { slug?: string };
@@ -235,7 +229,7 @@ const SharePopover = () => {
onClick={() => setopenSharePopoverPopover(!openSharePopover)}
className="mr-2 flex w-24 items-center justify-center space-x-2 rounded-md bg-white px-3 py-2.5 shadow transition-all duration-75 hover:shadow-md active:scale-95"
>
- <IconMenu text="Share" icon={<Share className="h-4 w-4" />} />
+ <IconMenu text="Share" icon={<Share2 className="h-4 w-4" />} />
</button>
</Popover>
);
diff --git a/components/app/links/link-sort.tsx b/components/app/links/link-sort.tsx
index 7aa6d64566..9ce3b1d7d5 100644
--- a/components/app/links/link-sort.tsx
+++ b/components/app/links/link-sort.tsx
@@ -1,13 +1,8 @@
import { useRouter } from "next/router";
import { useMemo, useState } from "react";
import IconMenu from "@/components/shared/icon-menu";
-import {
- ChevronDown,
- Sort,
- SortDesc,
- Tick,
- X,
-} from "@/components/shared/icons";
+import { Sort, Tick } from "@/components/shared/icons";
+import { ChevronDown, SortDesc } from "lucide-react";
import Popover from "@/components/shared/popover";
const sortOptions = [
diff --git a/components/app/modals/add-edit-link-modal/tags-section.tsx b/components/app/modals/add-edit-link-modal/tags-section.tsx
index 6d610dbc9e..e0e7362f6b 100644
--- a/components/app/modals/add-edit-link-modal/tags-section.tsx
+++ b/components/app/modals/add-edit-link-modal/tags-section.tsx
@@ -6,7 +6,7 @@ import {
useRef,
useState,
} from "react";
-import { Check, Tag, X } from "lucide-react";
+import { Check, ChevronDown, Tag, X } from "lucide-react";
import { Command, useCommandState } from "cmdk";
import TagBadge from "../../links/tag-badge";
import { LinkProps } from "#/lib/types";
@@ -15,7 +15,6 @@ import { useRouter } from "next/router";
import { toast } from "sonner";
import { mutate } from "swr";
import { LoadingCircle } from "#/ui/icons";
-import { ChevronDown } from "@/components/shared/icons";
import Tooltip from "#/ui/tooltip";
export default function TagsSection({
diff --git a/components/app/modals/link-qr-modal.tsx b/components/app/modals/link-qr-modal.tsx
index b645110c00..941386939d 100644
--- a/components/app/modals/link-qr-modal.tsx
+++ b/components/app/modals/link-qr-modal.tsx
@@ -8,7 +8,8 @@ import {
} from "react";
import { HexColorInput, HexColorPicker } from "react-colorful";
import BlurImage from "#/ui/blur-image";
-import { ChevronRight, Clipboard, Logo } from "@/components/shared/icons";
+import { Clipboard } from "@/components/shared/icons";
+import { ChevronRight } from "lucide-react";
import Modal from "@/components/shared/modal";
import Switch from "#/ui/switch";
import Tooltip, { TooltipContent } from "#/ui/tooltip";
@@ -104,17 +105,13 @@ function LinkQRModalHelper({
<Modal showModal={showLinkQRModal} setShowModal={setShowLinkQRModal}>
<div className="inline-block w-full transform bg-white align-middle shadow-xl transition-all sm:max-w-md sm:rounded-2xl sm:border sm:border-gray-200">
<div className="flex flex-col items-center justify-center space-y-3 border-b border-gray-200 px-4 py-4 pt-8 sm:px-16">
- {avatarUrl ? (
- <BlurImage
- src={avatarUrl}
- alt={apexDomain}
- className="h-10 w-10 rounded-full"
- width={40}
- height={40}
- />
- ) : (
- <Logo className="h-10 w-10" />
- )}
+ <BlurImage
+ src={avatarUrl || "/_static/logo.png"}
+ alt={apexDomain}
+ className="h-10 w-10 rounded-full"
+ width={40}
+ height={40}
+ />
<h3 className="text-lg font-medium">Download QR Code</h3>
</div>
diff --git a/components/layout/app/project-select.tsx b/components/layout/app/project-select.tsx
index 2119f08d1a..5247032920 100644
--- a/components/layout/app/project-select.tsx
+++ b/components/layout/app/project-select.tsx
@@ -2,7 +2,8 @@ import { useRouter } from "next/router";
import { useContext, useMemo, useState } from "react";
import { useSession } from "next-auth/react";
import BlurImage from "#/ui/blur-image";
-import { ChevronUpDown, PlusCircle, Tick } from "@/components/shared/icons";
+import { Tick } from "@/components/shared/icons";
+import { ChevronsUpDown, PlusCircle } from "lucide-react";
import Popover from "@/components/shared/popover";
import { PlanProps, ProjectWithDomainProps } from "#/lib/types";
import useProjects from "#/lib/swr/use-projects";
@@ -58,7 +59,7 @@ export default function ProjectSelect() {
<div className="flex animate-pulse items-center justify-end space-x-1.5 rounded-lg px-1.5 py-2 sm:w-60">
<div className="h-8 w-8 animate-pulse rounded-full bg-gray-200" />
<div className="hidden h-8 w-28 animate-pulse rounded-md bg-gray-200 sm:block sm:w-40" />
- <ChevronUpDown className="h-4 w-4 text-gray-400" aria-hidden="true" />
+ <ChevronsUpDown className="h-4 w-4 text-gray-400" aria-hidden="true" />
</div>
);
@@ -92,7 +93,10 @@ export default function ProjectSelect() {
{selected.slug !== "/" && <PlanBadge plan={selected.plan} />}
</div>
</div>
- <ChevronUpDown className="h-4 w-4 text-gray-400" aria-hidden="true" />
+ <ChevronsUpDown
+ className="h-4 w-4 text-gray-400"
+ aria-hidden="true"
+ />
</button>
</Popover>
</div>
@@ -184,7 +188,7 @@ function ProjectList({
onClick={() => setShowAddProjectModal(true)}
className="flex w-full cursor-pointer items-center space-x-2 rounded-md p-2 transition-all duration-75 hover:bg-gray-100"
>
- <PlusCircle className="h-7 w-7 text-gray-600" />
+ <PlusCircle className="h-6 w-6 text-gray-500" />
<span className="block truncate">Add a new project</span>
</button>
</div>
diff --git a/components/shared/icons/calendar.tsx b/components/shared/icons/calendar.tsx
deleted file mode 100644
index a429c8d4a7..0000000000
--- a/components/shared/icons/calendar.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-export default function Calendar({ className }: { className: string }) {
- return (
- <svg
- fill="none"
- shapeRendering="geometricPrecision"
- stroke="currentColor"
- strokeLinecap="round"
- strokeLinejoin="round"
- strokeWidth="1.5"
- viewBox="0 0 24 24"
- width="24"
- height="24"
- className={className}
- >
- <rect x="3" y="4" width="18" height="18" rx="2" ry="2" />
- <path d="M16 2v4" />
- <path d="M8 2v4" />
- <path d="M3 10h18" />
- </svg>
- );
-}
diff --git a/components/shared/icons/chevron-down.tsx b/components/shared/icons/chevron-down.tsx
deleted file mode 100644
index dea1e85cdd..0000000000
--- a/components/shared/icons/chevron-down.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-export default function ChevronDown({ className }: { className?: string }) {
- return (
- <svg
- className={className}
- viewBox="0 0 24 24"
- width="24"
- height="24"
- stroke="currentColor"
- strokeWidth="2"
- strokeLinecap="round"
- strokeLinejoin="round"
- fill="none"
- shapeRendering="geometricPrecision"
- >
- <path d="M6 9l6 6 6-6" />
- </svg>
- );
-}
diff --git a/components/shared/icons/chevron-left.tsx b/components/shared/icons/chevron-left.tsx
deleted file mode 100644
index d79b2beb38..0000000000
--- a/components/shared/icons/chevron-left.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-export default function ChevronLeft({ className }: { className?: string }) {
- return (
- <svg
- className={className}
- viewBox="0 0 24 24"
- width="24"
- height="24"
- stroke="currentColor"
- strokeWidth="2"
- strokeLinecap="round"
- strokeLinejoin="round"
- fill="none"
- shapeRendering="geometricPrecision"
- >
- <path d="M15 18l-6-6 6-6" />
- </svg>
- );
-}
diff --git a/components/shared/icons/chevron-right.tsx b/components/shared/icons/chevron-right.tsx
deleted file mode 100644
index 6d960f28a8..0000000000
--- a/components/shared/icons/chevron-right.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-export default function ChevronRight({ className }: { className?: string }) {
- return (
- <svg
- className={className}
- viewBox="0 0 24 24"
- width="24"
- height="24"
- stroke="currentColor"
- strokeWidth="2"
- strokeLinecap="round"
- strokeLinejoin="round"
- fill="none"
- shapeRendering="geometricPrecision"
- >
- <path d="M9 18l6-6-6-6" />
- </svg>
- );
-}
diff --git a/components/shared/icons/chevron-up-down.tsx b/components/shared/icons/chevron-up-down.tsx
deleted file mode 100644
index 89254048ec..0000000000
--- a/components/shared/icons/chevron-up-down.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-export default function ChevronUpDown({ className }: { className?: string }) {
- return (
- <svg
- className={className}
- viewBox="0 0 24 24"
- width="24"
- height="24"
- stroke="currentColor"
- strokeWidth="2"
- strokeLinecap="round"
- strokeLinejoin="round"
- fill="none"
- shapeRendering="geometricPrecision"
- >
- <path d="M17 8.517L12 3 7 8.517M7 15.48l5 5.517 5-5.517" />
- </svg>
- );
-}
diff --git a/components/shared/icons/index.tsx b/components/shared/icons/index.tsx
index 34548b7954..2c037f02ff 100644
--- a/components/shared/icons/index.tsx
+++ b/components/shared/icons/index.tsx
@@ -10,15 +10,10 @@ export { default as Github } from "./github";
export { default as Twitter } from "./twitter";
export { default as Facebook } from "./facebook";
export { default as LinkedIn } from "./linkedin";
-export { default as ChevronRight } from "./chevron-right";
-export { default as ChevronLeft } from "./chevron-left";
-export { default as ChevronDown } from "./chevron-down";
-export { default as ChevronUpDown } from "./chevron-up-down";
export { default as AlertCircleFill } from "./alert-circle-fill";
export { default as ExternalLink } from "./external-link";
export { default as XCircleFill } from "./x-circle-fill";
export { default as CheckCircleFill } from "./check-circle-fill";
-export { default as PlusCircle } from "./plus-circle";
export { default as Link } from "./link";
export { default as Infinity } from "./infinity";
export { default as Drag } from "./drag";
@@ -28,13 +23,11 @@ export { default as Lock } from "./lock";
export { default as QR } from "./qr";
export { default as Download } from "./download";
export { default as Clipboard } from "./clipboard";
-export { default as Calendar } from "./calendar";
export { default as ThreeDots } from "./three-dots";
export { default as Random } from "./random";
export { default as Filter } from "./filter";
export { default as Search } from "./search";
export { default as Sort } from "./sort";
-export { default as SortDesc } from "./sort-desc";
export { default as Edit } from "./edit";
export { default as Archive } from "./archive";
export { default as Delete } from "./delete";
@@ -47,5 +40,4 @@ export { default as EyeOff } from "./eye-off";
export { default as Heart } from "./heart";
export { default as Repeat } from "./repeat";
export { default as Message } from "./message";
-export { default as Share } from "./share";
export { default as Google } from "./google";
diff --git a/components/shared/icons/plus-circle.tsx b/components/shared/icons/plus-circle.tsx
deleted file mode 100644
index e294d2c88d..0000000000
--- a/components/shared/icons/plus-circle.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-export default function PlusCircle({ className }: { className: string }) {
- return (
- <svg
- fill="none"
- shapeRendering="geometricPrecision"
- stroke="currentColor"
- strokeLinecap="round"
- strokeLinejoin="round"
- strokeWidth="1.5"
- viewBox="0 0 24 24"
- width="24"
- height="24"
- className={className}
- >
- <circle cx="12" cy="12" r="10" />
- <path d="M12 8v8" />
- <path d="M8 12h8" />
- </svg>
- );
-}
diff --git a/components/shared/icons/share.tsx b/components/shared/icons/share.tsx
deleted file mode 100644
index a9dbba439b..0000000000
--- a/components/shared/icons/share.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-export default function Share({ className }: { className: string }) {
- return (
- <svg
- fill="none"
- shapeRendering="geometricPrecision"
- stroke="currentColor"
- strokeLinecap="round"
- strokeLinejoin="round"
- strokeWidth="1.5"
- viewBox="0 0 24 24"
- width="14"
- height="14"
- className={className}
- >
- <circle cx="18" cy="5" r="3"></circle>
- <circle cx="6" cy="12" r="3"></circle>
- <circle cx="18" cy="19" r="3"></circle>
- <line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line>
- <line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line>
- </svg>
- );
-}
diff --git a/components/shared/icons/sort-desc.tsx b/components/shared/icons/sort-desc.tsx
deleted file mode 100644
index bd4b96adc2..0000000000
--- a/components/shared/icons/sort-desc.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-export default function SortDesc({ className }: { className: string }) {
- return (
- <svg
- fill="none"
- shapeRendering="geometricPrecision"
- stroke="currentColor"
- strokeLinecap="round"
- strokeLinejoin="round"
- strokeWidth="1.5"
- viewBox="0 0 24 24"
- width="24"
- height="24"
- className={className}
- >
- <path d="M11 5h10"></path>
- <path d="M11 9h7"></path>
- <path d="M11 13h4"></path>
- <path d="m3 17 3 3 3-3"></path>
- <path d="M6 18V4"></path>
- </svg>
- );
-}
diff --git a/components/stats/toggle.tsx b/components/stats/toggle.tsx
index 7e2bd782c7..9c13e6daf2 100644
--- a/components/stats/toggle.tsx
+++ b/components/stats/toggle.tsx
@@ -1,12 +1,7 @@
import { useRouter } from "next/router";
import { useContext, useMemo, useState } from "react";
-import {
- Calendar,
- ChevronDown,
- Copy,
- Share,
- Tick,
-} from "@/components/shared/icons";
+import { Copy, Tick } from "@/components/shared/icons";
+import { Calendar, Share2, ChevronDown, Lock } from "lucide-react";
import { ExpandingArrow } from "#/ui/icons";
import { INTERVALS } from "#/lib/stats";
import useScroll from "#/lib/hooks/use-scroll";
@@ -21,7 +16,6 @@ import { StatsContext } from ".";
import useProject from "#/lib/swr/use-project";
import Tooltip, { TooltipContent } from "#/ui/tooltip";
import { ModalContext } from "#/ui/modal-provider";
-import { Lock } from "lucide-react";
export default function Toggle({ atModalTop }: { atModalTop?: boolean }) {
const router = useRouter();
@@ -255,7 +249,7 @@ const SharePopover = () => {
onClick={() => setopenSharePopoverPopover(!openSharePopover)}
className="mr-2 flex w-24 items-center justify-center space-x-2 rounded-md bg-white px-3 py-2.5 shadow transition-all duration-75 hover:shadow-md active:scale-95"
>
- <IconMenu text="Share" icon={<Share className="h-4 w-4" />} />
+ <IconMenu text="Share" icon={<Share2 className="h-4 w-4" />} />
</button>
</Popover>
);