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.

Minor fixes

Steven Tey76057a0497a4
diff --git a/apps/web/app/(ee)/partners.dub.co/(dashboard)/profile/postbacks/page-client.tsx b/apps/web/app/(ee)/partners.dub.co/(dashboard)/profile/postbacks/page-client.tsx
index d82bd0306e..e55f4a375e 100644
--- a/apps/web/app/(ee)/partners.dub.co/(dashboard)/profile/postbacks/page-client.tsx
+++ b/apps/web/app/(ee)/partners.dub.co/(dashboard)/profile/postbacks/page-client.tsx
@@ -37,7 +37,7 @@ export function PostbacksPageClient() {
titleInfo={{
title:
"Receive HTTP requests when events like leads, sales, or commissions occur in your partner programs.",
- href: "https://dub.co/help",
+ href: "https://d.to/postbacks",
}}
controls={<AddPostbackButton onClick={openAddPostbackModal} />}
>
@@ -91,7 +91,7 @@ export function PostbacksPageClient() {
</PageWidthWrapper>
</PageContent>
{AddEditPostbackModal}
- <PostbackSecretModal />
+ {PostbackSecretModal}
</>
);
}
diff --git a/apps/web/ui/modals/oauth-app-created-modal.tsx b/apps/web/ui/modals/oauth-app-created-modal.tsx
index 362cb51c65..bed957ec28 100644
--- a/apps/web/ui/modals/oauth-app-created-modal.tsx
+++ b/apps/web/ui/modals/oauth-app-created-modal.tsx
@@ -61,7 +61,7 @@ function OAuthAppCreatedModal({
});
}}
type="button"
- className="text-neutral-90 flex h-7 shrink-0 items-center gap-2 rounded-md border border-neutral-200 bg-white px-2 py-1 text-xs font-medium hover:bg-neutral-50"
+ className="flex h-7 shrink-0 items-center gap-2 rounded-md border border-neutral-200 bg-white px-2 py-1 text-xs font-medium text-neutral-900 hover:bg-neutral-50"
>
{copied && copiedField === "id" ? (
<Tick className="h-3.5 w-3.5" />
@@ -90,7 +90,7 @@ function OAuthAppCreatedModal({
});
}}
type="button"
- className="text-neutral-90 flex h-7 shrink-0 items-center gap-2 rounded-md border border-neutral-200 bg-white px-2 py-1 text-xs font-medium hover:bg-neutral-50"
+ className="flex h-7 shrink-0 items-center gap-2 rounded-md border border-neutral-200 bg-white px-2 py-1 text-xs font-medium text-neutral-900 hover:bg-neutral-50"
>
{copied && copiedField === "secret" ? (
<Tick className="h-3.5 w-3.5" />
diff --git a/apps/web/ui/modals/token-created-modal.tsx b/apps/web/ui/modals/token-created-modal.tsx
index 584434ad83..799c0568a5 100644
--- a/apps/web/ui/modals/token-created-modal.tsx
+++ b/apps/web/ui/modals/token-created-modal.tsx
@@ -46,7 +46,7 @@ function TokenCreatedModal({
});
}}
type="button"
- className="text-neutral-90 flex h-7 items-center gap-2 rounded-md border border-neutral-200 bg-white px-2 py-1 text-xs font-medium hover:bg-neutral-50"
+ className="flex h-7 items-center gap-2 rounded-md border border-neutral-200 bg-white px-2 py-1 text-xs font-medium text-neutral-900 hover:bg-neutral-50"
>
{copied ? (
<Tick className="h-3.5 w-3.5" />
diff --git a/apps/web/ui/postbacks/postback-secret-modal.tsx b/apps/web/ui/postbacks/postback-secret-modal.tsx
index fc8cf35ac9..91216d0191 100644
--- a/apps/web/ui/postbacks/postback-secret-modal.tsx
+++ b/apps/web/ui/postbacks/postback-secret-modal.tsx
@@ -48,7 +48,7 @@ function PostbackSecretModal({
});
}}
type="button"
- className="text-neutral-90 flex h-7 shrink-0 items-center gap-2 rounded-md border border-neutral-200 bg-white px-2 py-1 text-xs font-medium hover:bg-neutral-50"
+ className="flex h-7 shrink-0 items-center gap-2 rounded-md border border-neutral-200 bg-white px-2 py-1 text-xs font-medium text-neutral-900 hover:bg-neutral-50"
>
{copied ? (
<Tick className="h-3.5 w-3.5" />
@@ -71,6 +71,29 @@ function PostbackSecretModal({
);
}
+interface PostbackSecretModalWrapperProps {
+ state: { show: boolean; secret: string };
+ closePostbackSecretModal: () => void;
+}
+
+function PostbackSecretModalWrapper({
+ state,
+ closePostbackSecretModal,
+}: PostbackSecretModalWrapperProps) {
+ if (!state.show) return null;
+
+ return (
+ <PostbackSecretModal
+ showModal={state.show}
+ setShowModal={(show) => {
+ const next = typeof show === "function" ? show(state.show) : show;
+ if (!next) closePostbackSecretModal();
+ }}
+ secret={state.secret}
+ />
+ );
+}
+
export function usePostbackSecretModal() {
const [state, setState] = useState<{ show: boolean; secret: string }>({
show: false,
@@ -85,25 +108,15 @@ export function usePostbackSecretModal() {
setState({ show: false, secret: "" });
}
- function PostbackSecretModalWrapper() {
- if (!state.show) return null;
-
- return (
- <PostbackSecretModal
- showModal={state.show}
- setShowModal={(show) => {
- const next = typeof show === "function" ? show(state.show) : show;
- if (!next) closePostbackSecretModal();
- }}
- secret={state.secret}
- />
- );
- }
-
return {
openPostbackSecretModal,
closePostbackSecretModal,
- PostbackSecretModal: PostbackSecretModalWrapper,
+ PostbackSecretModal: (
+ <PostbackSecretModalWrapper
+ state={state}
+ closePostbackSecretModal={closePostbackSecretModal}
+ />
+ ),
isPostbackSecretModalOpen: state.show,
};
}