Skip to content

Commit

Permalink
Enable customer portal for everyone (#1744)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlago99 committed Sep 19, 2024
1 parent 34d6693 commit f59b8f1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/pages/CustomerDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ import {
useGetCustomerQuery,
} from '~/generated/graphql'
import { useInternationalization } from '~/hooks/core/useInternationalization'
import { useCurrentUser } from '~/hooks/useCurrentUser'
import { usePermissions } from '~/hooks/usePermissions'
import ErrorImage from '~/public/images/maneki/error.svg'
import { MenuPopper, NAV_HEIGHT, PageHeader, theme } from '~/styles'
Expand Down Expand Up @@ -106,7 +105,6 @@ const CustomerDetails = () => {
const addCouponDialogRef = useRef<AddCouponToCustomerDialogRef>(null)
const premiumWarningDialogRef = useRef<PremiumWarningDialogRef>(null)
const { translate } = useInternationalization()
const { isPremium } = useCurrentUser()
const { hasPermissions } = usePermissions()
const navigate = useNavigate()
const { customerId, tab } = useParams()
Expand Down Expand Up @@ -184,12 +182,10 @@ const CustomerDetails = () => {
</HeaderInlineBreadcrumbBlock>
<HeaderInlineActionsBlock>
<GoToPortalButton
startIcon={isPremium ? 'outside' : 'sparkles'}
startIcon={'outside'}
variant="quaternary"
onClick={async () => {
isPremium
? await generatePortalUrl({ variables: { input: { id: customerId as string } } })
: premiumWarningDialogRef.current?.openDialog()
await generatePortalUrl({ variables: { input: { id: customerId as string } } })
}}
>
{translate('text_641b1b19d6e64300632ca60c')}
Expand Down

0 comments on commit f59b8f1

Please sign in to comment.