fix: 404 links issue (#9928)

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
pull/9667/head^2
Leo Giovanetti 2023-07-11 10:05:41 -03:00 committed by GitHub
parent f62e6d9586
commit c6fd91d181
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 12 deletions

View File

@ -58,16 +58,21 @@ export default function Custom404() {
// Accessing a non-existent team
setUsername(splitPath[2]);
setCurrentPageType(pageType.TEAM);
setUrl(`${WEBSITE_URL}/signup?callbackUrl=settings/teams/new%3Fslug%3D${username.replace("/", "")}`);
setUrl(
`${WEBSITE_URL}/signup?callbackUrl=settings/teams/new%3Fslug%3D${splitPath[2].replace("/", "")}`
);
} else {
setUsername(routerUsername);
setUrl(`${WEBSITE_URL}/signup?username=${username.replace("/", "")}`);
setUrl(`${WEBSITE_URL}/signup?username=${routerUsername.replace("/", "")}`);
}
} else {
setUsername(currentOrgDomain);
setCurrentPageType(pageType.ORG);
setUrl(
`${WEBSITE_URL}/signup?callbackUrl=settings/organizations/new%3Fslug%3D${username.replace("/", "")}`
`${WEBSITE_URL}/signup?callbackUrl=settings/organizations/new%3Fslug%3D${currentOrgDomain.replace(
"/",
""
)}`
);
}
}, []);
@ -316,7 +321,7 @@ export default function Custom404() {
.filter((_, idx) => currentPageType === pageType.ORG || idx !== 0)
.map((link, linkIdx) => (
<li key={linkIdx} className="px-4 py-2">
<Link
<a
href={link.href}
className="relative flex items-start space-x-4 py-6 rtl:space-x-reverse">
<div className="flex-shrink-0">
@ -336,7 +341,7 @@ export default function Custom404() {
<div className="flex-shrink-0 self-center">
<ChevronRight className="text-muted h-5 w-5" aria-hidden="true" />
</div>
</Link>
</a>
</li>
))}
<li className="px-4 py-2">

View File

@ -49,7 +49,6 @@ import {
HeadSeo,
Logo,
SkeletonText,
SkeletonAvatar,
Tooltip,
showToast,
useCalcomTheme,
@ -852,12 +851,6 @@ function SideBar({ bannersHeight, user }: SideBarProps) {
</span>
</div>
)}
{!isLocaleReady && (
<div className="flex w-full gap-1">
<SkeletonAvatar className="min-w-5 min-h-5 mt-0 h-5 w-5" />
<SkeletonText className="h-[20px] w-full" />
</div>
)}
<div className="flex space-x-0.5 rtl:space-x-reverse">
<button
color="minimal"