fix: [CAL-2005] Issue with loading skeleton on new side menu (#9829)
* remove mx-auto from the Icon in bottom navigation link * add loading skeleton for the profile links
This commit is contained in:
parent
852d5b3954
commit
42494c7c2b
|
@ -797,32 +797,26 @@ function SideBar({ bannersHeight, user }: SideBarProps) {
|
|||
const orgBranding = useOrgBrandingValues();
|
||||
const publicPageUrl = orgBranding?.slug ? getOrganizationUrl(orgBranding?.slug) : "";
|
||||
const bottomNavItems: NavigationItemType[] = [
|
||||
...(user?.username
|
||||
? [
|
||||
{
|
||||
name: "view_public_page",
|
||||
href: !!user?.organizationId
|
||||
? publicPageUrl
|
||||
: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/${user.username}`,
|
||||
icon: ExternalLink,
|
||||
target: "__blank",
|
||||
},
|
||||
{
|
||||
name: "copy_public_page_link",
|
||||
href: "",
|
||||
onClick: (e: { preventDefault: () => void }) => {
|
||||
e.preventDefault();
|
||||
navigator.clipboard.writeText(
|
||||
!!user?.organizationId
|
||||
? publicPageUrl
|
||||
: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/${user.username}`
|
||||
);
|
||||
showToast(t("link_copied"), "success");
|
||||
},
|
||||
icon: Copy,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{
|
||||
name: "view_public_page",
|
||||
href: !!user?.organizationId
|
||||
? publicPageUrl
|
||||
: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/${user?.username}`,
|
||||
icon: ExternalLink,
|
||||
target: "__blank",
|
||||
},
|
||||
{
|
||||
name: "copy_public_page_link",
|
||||
href: "",
|
||||
onClick: (e: { preventDefault: () => void }) => {
|
||||
e.preventDefault();
|
||||
navigator.clipboard.writeText(
|
||||
!!user?.organizationId ? publicPageUrl : `${process.env.NEXT_PUBLIC_WEBSITE_URL}/${user?.username}`
|
||||
);
|
||||
showToast(t("link_copied"), "success");
|
||||
},
|
||||
icon: Copy,
|
||||
},
|
||||
{
|
||||
name: "settings",
|
||||
href: user?.organizationId
|
||||
|
@ -922,7 +916,7 @@ function SideBar({ bannersHeight, user }: SideBarProps) {
|
|||
<Icon
|
||||
className={classNames(
|
||||
"h-4 w-4 flex-shrink-0 [&[aria-current='page']]:text-inherit",
|
||||
"mx-auto md:ltr:mr-2 md:rtl:ml-2"
|
||||
"md:ltr:mr-2 md:rtl:ml-2"
|
||||
)}
|
||||
aria-hidden="true"
|
||||
aria-current={
|
||||
|
|
Loading…
Reference in New Issue
Block a user