fix: vercel subdomain version (#10790)
* Standarizing org subdomain url * fix: upgrading vercel subdomain version
This commit is contained in:
1 parent
3cab37ed8d
commit
20c45b5d88
8 files changed
+26
-18
No files matched your search
@@ -57,7 +57,7 @@ export default function OtherTeamListItem(props: Props) {
|
||||
<span className="text-muted block text-xs">
|
||||
{team.slug
|
||||
? orgBranding
|
||||
? `${orgBranding.fullDomain}${team.slug}`
|
||||
? `${orgBranding.fullDomain}/${team.slug}`
|
||||
: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/team/${team.slug}`
|
||||
: "Unpublished team"}
|
||||
</span>
|
||||
@@ -81,8 +81,8 @@ export default function OtherTeamListItem(props: Props) {
|
||||
`${
|
||||
orgBranding
|
||||
? `${orgBranding.fullDomain}`
|
||||
: process.env.NEXT_PUBLIC_WEBSITE_URL + "/team/"
|
||||
}${team.slug}`
|
||||
: process.env.NEXT_PUBLIC_WEBSITE_URL + "/team"
|
||||
}/${team.slug}`
|
||||
);
|
||||
showToast(t("link_copied"), "success");
|
||||
}}
|
||||
@@ -119,8 +119,8 @@ export default function OtherTeamListItem(props: Props) {
|
||||
href={`${
|
||||
orgBranding
|
||||
? `${orgBranding.fullDomain}`
|
||||
: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/team/other/`
|
||||
}${team.slug}`}
|
||||
: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/team/other`
|
||||
}/${team.slug}`}
|
||||
StartIcon={ExternalLink}>
|
||||
{t("preview_team") as string}
|
||||
</DropdownItem>
|
||||
|
||||
@@ -111,8 +111,9 @@ export const CreateANewTeamForm = () => {
|
||||
placeholder="acme"
|
||||
label={t("team_url")}
|
||||
addOnLeading={`${
|
||||
orgBranding?.fullDomain.replace("https://", "").replace("http://", "") ??
|
||||
`${extractDomainFromWebsiteUrl}/team/`
|
||||
orgBranding
|
||||
? orgBranding.fullDomain.replace("https://", "").replace("http://", "") + "/"
|
||||
: `${extractDomainFromWebsiteUrl}/team/`
|
||||
}`}
|
||||
defaultValue={value}
|
||||
onChange={(e) => {
|
||||
|
||||
@@ -103,7 +103,7 @@ export default function TeamListItem(props: Props) {
|
||||
<span className="text-muted block text-xs">
|
||||
{team.slug
|
||||
? orgBranding
|
||||
? `${orgBranding.fullDomain}${team.slug}`
|
||||
? `${orgBranding.fullDomain}/${team.slug}`
|
||||
: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/team/${team.slug}`
|
||||
: "Unpublished team"}
|
||||
</span>
|
||||
@@ -238,8 +238,8 @@ export default function TeamListItem(props: Props) {
|
||||
`${
|
||||
orgBranding
|
||||
? `${orgBranding.fullDomain}`
|
||||
: process.env.NEXT_PUBLIC_WEBSITE_URL + "/team/"
|
||||
}${team.slug}`
|
||||
: process.env.NEXT_PUBLIC_WEBSITE_URL + "/team"
|
||||
}/${team.slug}`
|
||||
);
|
||||
showToast(t("link_copied"), "success");
|
||||
}}
|
||||
@@ -278,8 +278,8 @@ export default function TeamListItem(props: Props) {
|
||||
href={`${
|
||||
orgBranding
|
||||
? `${orgBranding.fullDomain}`
|
||||
: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/team/`
|
||||
}${team.slug}`}
|
||||
: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/team`
|
||||
}/${team.slug}`}
|
||||
StartIcon={ExternalLink}>
|
||||
{t("preview_team") as string}
|
||||
</DropdownItem>
|
||||
|
||||
@@ -227,7 +227,7 @@ const ProfileView = () => {
|
||||
value={value}
|
||||
addOnLeading={
|
||||
team.parent && orgBranding
|
||||
? getOrgFullDomain(orgBranding?.slug, { protocol: false })
|
||||
? getOrgFullDomain(orgBranding?.slug, { protocol: false }) + "/"
|
||||
: `${WEBAPP_URL}/team/`
|
||||
}
|
||||
onChange={(e) => {
|
||||
|
||||
@@ -29,7 +29,7 @@ type CreateOptions = {
|
||||
|
||||
const vercelCreateDomain = async (domain: string) => {
|
||||
const response = await fetch(
|
||||
`https://api.vercel.com/v8/projects/${process.env.PROJECT_ID_VERCEL}/domains?teamId=${process.env.TEAM_ID_VERCEL}`,
|
||||
`https://api.vercel.com/v9/projects/${process.env.PROJECT_ID_VERCEL}/domains?teamId=${process.env.TEAM_ID_VERCEL}`,
|
||||
{
|
||||
body: JSON.stringify({ name: `${domain}.${subdomainSuffix()}` }),
|
||||
headers: {
|
||||
|
||||
Reference in new issue
Block a user