forked from novuhq/novu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(web): pixel perfect UI implementation of clerk components (novuhq…
…#6376) Co-authored-by: Sokratis Vidros <[email protected]>
- Loading branch information
1 parent
a353b88
commit c9686de
Showing
10 changed files
with
450 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,6 @@ | ||
import { UserButton } from '@clerk/clerk-react'; | ||
import { useColorScheme } from '@novu/design-system'; | ||
import { Title } from '@novu/novui'; | ||
import { IconCreditCard, IconGroup, IconRoomPreferences, IconWorkspacePremium } from '@novu/novui/icons'; | ||
import { FeatureFlagsKeysEnum } from '@novu/shared'; | ||
import { ROUTES } from '../../../constants/routes'; | ||
import { useFeatureFlag } from '../../../hooks'; | ||
import { BrandingPage } from '../../../pages/brand/BrandingPage'; | ||
import { BillingPage } from '../../billing/pages/BillingPage'; | ||
import { CustomOrganizationProfile } from './CustomOrganizationProfile'; | ||
|
||
export function UserProfileButton() { | ||
const isV2Enabled = useFeatureFlag(FeatureFlagsKeysEnum.IS_V2_ENABLED); | ||
const { colorScheme } = useColorScheme(); | ||
const headerColor = colorScheme === 'dark' ? 'rgb(255, 255, 255)' : 'rgb(33, 33, 38)'; | ||
|
||
return ( | ||
<UserButton afterSignOutUrl={ROUTES.AUTH_LOGIN}> | ||
<UserButton.UserProfilePage label="account" /> | ||
<UserButton.UserProfilePage label="security" /> | ||
<UserButton.UserProfilePage label="Organization" url={ROUTES.ORGANIZATION} labelIcon={<IconRoomPreferences />}> | ||
<CustomOrganizationProfile firstItem="general" /> | ||
</UserButton.UserProfilePage> | ||
|
||
<UserButton.UserProfilePage label="Team members" url={ROUTES.TEAM} labelIcon={<IconGroup />}> | ||
<CustomOrganizationProfile firstItem="members" /> | ||
</UserButton.UserProfilePage> | ||
|
||
{!isV2Enabled && ( | ||
<UserButton.UserProfilePage label="Branding" url={ROUTES.BRAND_SETTINGS} labelIcon={<IconWorkspacePremium />}> | ||
<BrandingPage /> | ||
</UserButton.UserProfilePage> | ||
)} | ||
|
||
<UserButton.UserProfilePage label="Billing plans" url={ROUTES.BILLING} labelIcon={<IconCreditCard />}> | ||
<Title marginBottom="150" variant="section" color={headerColor}> | ||
Billing plans | ||
</Title> | ||
<BillingPage /> | ||
</UserButton.UserProfilePage> | ||
</UserButton> | ||
); | ||
return <UserButton afterSignOutUrl={ROUTES.AUTH_LOGIN} userProfileUrl={ROUTES.MANAGE_ACCOUNT_USER_PROFILE} />; | ||
} |
Oops, something went wrong.