Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

remove hardcoded domain

Brendan Allanccd7fbedee3b
diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomain.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomain.tsx
index d97beecb2..35b07f195 100644
--- a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomain.tsx
+++ b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomain.tsx
@@ -9,8 +9,6 @@ import { toast } from "sonner";
import { CheckCircle, XCircle } from "lucide-react";
import clsx from "clsx";
-
-
export function CustomDomain() {
const router = useRouter();
const { activeOrganization, isSubscribed } = useDashboardContext();
@@ -21,8 +19,7 @@ export function CustomDomain() {
);
const [loading, setLoading] = useState(false);
- const orgCustomDomain = activeOrganization?.organization.customDomain
-
+ const orgCustomDomain = activeOrganization?.organization.customDomain;
const handleRemoveDomain = async () => {
if (!isSubscribed) {
@@ -49,8 +46,7 @@ export function CustomDomain() {
return (
<>
- {
- showCustomDomainDialog && (
+ {showCustomDomainDialog && (
<CustomDomainDialog
isVerified={isVerified}
setIsVerified={setIsVerified}
@@ -58,35 +54,49 @@ export function CustomDomain() {
setShowUpgradeModal={(arg) => setShowUpgradeModal(arg)}
onClose={() => setShowCustomDomainDialog(false)}
/>
- )
- }
+ )}
<div className="flex gap-3 justify-between items-center w-full h-fit">
<div className="space-y-1">
- <div className={clsx("flex gap-3 items-center", (isVerified && orgCustomDomain) || (!isVerified && orgCustomDomain) ? "mb-3" : "mb-0")}>
- <h1 className="text-sm font-medium text-gray-12">Custom Domain</h1>
- {isVerified && orgCustomDomain ? (
- <>
- <div className="flex gap-2 items-center px-3 py-0.5 bg-green-900 rounded-full w-fit">
- <CheckCircle className="text-green-200 size-2.5" />
- <p className="text-[11px] italic font-medium text-white">www.aashhab.design
- <span className="ml-1 not-italic text-white/60">verified</span></p>
- </div>
- </>
- ) : orgCustomDomain ? (
- <>
- <div className="flex gap-2 items-center px-3 py-0.5 bg-red-900 rounded-full w-fit">
- <XCircle className="text-red-200 size-2.5" />
- <p className="text-[11px] italic font-medium text-white">{orgCustomDomain}
- <span className="ml-1 not-italic text-white/60">not verified</span></p>
- </div>
- </>
- ) : null}
+ <div
+ className={clsx(
+ "flex gap-3 items-center",
+ (isVerified && orgCustomDomain) ||
+ (!isVerified && orgCustomDomain)
+ ? "mb-3"
+ : "mb-0"
+ )}
+ >
+ <h1 className="text-sm font-medium text-gray-12">Custom Domain</h1>
+ {isVerified && orgCustomDomain ? (
+ <>
+ <div className="flex gap-2 items-center px-3 py-0.5 bg-green-900 rounded-full w-fit">
+ <CheckCircle className="text-green-200 size-2.5" />
+ <p className="text-[11px] italic font-medium text-white">
+ {orgCustomDomain}
+ <span className="ml-1 not-italic text-white/60">
+ verified
+ </span>
+ </p>
+ </div>
+ </>
+ ) : orgCustomDomain ? (
+ <>
+ <div className="flex gap-2 items-center px-3 py-0.5 bg-red-900 rounded-full w-fit">
+ <XCircle className="text-red-200 size-2.5" />
+ <p className="text-[11px] italic font-medium text-white">
+ {orgCustomDomain}
+ <span className="ml-1 not-italic text-white/60">
+ not verified
+ </span>
+ </p>
+ </div>
+ </>
+ ) : null}
</div>
<p className="text-sm w-full max-w-[375px] text-gray-10">
Set up a custom domain for your organization's shared caps and make
it unique.
</p>
-
</div>
<Button
type="submit"