Skip to content

Commit

Permalink
Merge pull request #1902 from dubinc/nav-updates
Browse files Browse the repository at this point in the history
Nav Updates
  • Loading branch information
steven-tey authored Jan 16, 2025
2 parents 5f47aa4 + e25aefb commit c9c1ed1
Show file tree
Hide file tree
Showing 12 changed files with 809 additions and 130 deletions.
2 changes: 1 addition & 1 deletion apps/web/lib/webhook/qstash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const publishWebhookEventToQStash = async ({
},
callback: callbackUrl.href,
failureCallback: callbackUrl.href,
...(process.env.NODE_ENV === "test" && { delay: 2 }),
...(process.env.NODE_ENV === "test" && { delay: 5 }),
});

if (!response.messageId) {
Expand Down
7 changes: 2 additions & 5 deletions apps/web/tests/webhooks/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ const eventSchemas: Record<WebhookTrigger, z.ZodSchema> = {

describe.concurrent("suite", () => {
WEBHOOK_TRIGGERS.forEach((trigger) => {
it(`webhook event - ${trigger}`, async () => {
await testWebhookEvent(trigger);
});
it(`webhook event - ${trigger}`, () => testWebhookEvent(trigger));
});
});

Expand All @@ -65,11 +63,10 @@ const testWebhookEvent = async (trigger: WebhookTrigger) => {

const messageId = response[0].messageId;
const qstashMessage = await qstash.messages.get(messageId);

assertQstashMessage(qstashMessage, data, trigger);
};

const assertQstashMessage = async (
const assertQstashMessage = (
qstashMessage: Message,
body: any,
trigger: WebhookTrigger,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dub/ui",
"description": "UI components for Dub.co",
"version": "0.2.16",
"version": "0.2.19",
"sideEffects": false,
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down
67 changes: 57 additions & 10 deletions packages/ui/src/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,25 @@ import {
ConnectedDotsFill,
CubeSettingsFill,
FeatherFill,
Github,
Go,
HeadsetFill,
HeartFill,
HexadecagonStar,
Hyperlink,
LinesY,
LinkedIn,
Php,
ProductHunt,
Python,
Raycast,
Ruby,
Twitter,
Typescript,
YouTube,
} from "./icons";
import { Elxo } from "./icons/elxo";
import { Logo } from "./logo";

export const FEATURES_LIST = [
{
Expand Down Expand Up @@ -105,6 +112,33 @@ export const SDKS = [
];

export const RESOURCES = [
{
icon: Book2Fill,
title: "Docs",
description: "Platform documentation",
href: "/docs/introduction",
},
{
icon: HeadsetFill,
title: "Help Center",
description: "Answers to your questions",
href: "/help",
},
{
icon: HexadecagonStar,
title: "Dub Brand",
description: "Logos, wordmark, etc.",
href: "/brand",
},
];

export const COMPANY = [
{
icon: Logo,
title: "About",
description: "Company and team",
href: "/about",
},
{
icon: FeatherFill,
title: "Blog",
Expand All @@ -118,16 +152,10 @@ export const RESOURCES = [
href: "/changelog",
},
{
icon: Book2Fill,
title: "Docs",
description: "Platform documentation",
href: "/docs/introduction",
},
{
icon: HeadsetFill,
title: "Help Center",
description: "Answers to your questions",
href: "/help",
icon: HeartFill,
title: "Customers",
description: "Success stories and use cases",
href: "/customers",
},
];

Expand All @@ -145,3 +173,22 @@ export const LEGAL_PAGES = [
{ name: "Subprocessors", slug: "subprocessors" },
{ name: "Report Abuse", slug: "abuse" },
];

export const SOCIAL_LINKS = [
{ name: "X (Twitter)", icon: Twitter, href: "https://x.com/dubdotco" },
{
name: "LinkedIn",
icon: LinkedIn,
href: "https://www.linkedin.com/company/dubinc",
},
{
name: "GitHub",
icon: Github,
href: "https://github.com/dubinc/dub",
},
{
name: "YouTube",
icon: YouTube,
href: "https://www.youtube.com/@dubdotco",
},
];
20 changes: 20 additions & 0 deletions packages/ui/src/icons/nucleo/heart-fill.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { SVGProps } from "react";

export function HeartFill(props: SVGProps<SVGSVGElement>) {
return (
<svg
height="18"
width="18"
viewBox="0 0 18 18"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<g fill="currentColor">
<path
d="M12.164,2c-1.195,.015-2.324,.49-3.164,1.306-.84-.815-1.972-1.291-3.178-1.306-2.53,.015-4.582,2.084-4.572,4.609,0,5.253,5.306,8.429,6.932,9.278,.256,.133,.537,.2,.818,.2s.562-.067,.817-.2c1.626-.848,6.933-4.024,6.933-9.275,.009-2.528-2.042-4.597-4.586-4.612Z"
fill="currentColor"
/>
</g>
</svg>
);
}
1 change: 1 addition & 0 deletions packages/ui/src/icons/nucleo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export * from "./grid-layout-rows";
export * from "./grid-plus";
export * from "./headset";
export * from "./headset-fill";
export * from "./heart-fill";
export * from "./hexadecagon-star";
export * from "./hyperlink";
export * from "./icosahedron";
Expand Down
50 changes: 50 additions & 0 deletions packages/ui/src/nav/content/company-content.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { cn, createHref } from "@dub/utils";
import { COMPANY, SOCIAL_LINKS } from "../../content";
import {
contentHeadingClassName,
ContentLinkCard,
getUtmParams,
LargeLinkCard,
} from "./shared";

export function CompanyContent({ domain }: { domain: string }) {
return (
<div className="grid w-[540px] grid-cols-[minmax(0,1fr),minmax(0,0.75fr)] divide-x divide-neutral-200">
<div className="flex flex-col gap-4 p-4">
{COMPANY.map(({ title, description, icon, href }) => (
<LargeLinkCard
key={title}
title={title}
description={description}
icon={icon}
iconClassName="size-5"
href={createHref(
href,
domain,
getUtmParams({ domain, utm_content: title }),
)}
/>
))}
</div>
<div className="px-6 py-4">
<p className={cn(contentHeadingClassName, "mb-2")}>Social</p>
<div className="grid grid-cols-1">
{SOCIAL_LINKS.map(({ icon: Icon, name, href }) => (
<ContentLinkCard
key={href}
href={href}
target="_blank"
className="-mx-2"
icon={
<div className="shrink-0 rounded-lg border border-neutral-200 bg-white/50 p-1.5 dark:border-white/20 dark:bg-white/10">
<Icon className="size-4 shrink-0 text-neutral-600 transition-colors dark:text-white/60" />
</div>
}
title={name}
/>
))}
</div>
</div>
</div>
);
}
Loading

0 comments on commit c9c1ed1

Please sign in to comment.