refactor: use flag in graphql objects

This commit is contained in:
José Oliveira 2021-03-02 12:28:13 +00:00 committed by Josh Harvey
parent 4116069bd5
commit f394606821
4 changed files with 14 additions and 10 deletions

View file

@ -27,7 +27,6 @@ import {
import { getFormattedPhone, getName } from './helper'
const useStyles = makeStyles(styles)
const ANONYMOUS_USER_NAME = 'anonymous'
const GET_CUSTOMER = gql`
query customer($customerId: ID!) {
@ -38,7 +37,7 @@ const GET_CUSTOMER = gql`
frontCameraPath
frontCameraOverride
phone
name
isAnonymous
smsOverride
idCardData
idCardDataOverride
@ -167,7 +166,7 @@ const CustomerProfile = memo(() => {
locale={locale}
setShowCompliance={() => setShowCompliance(!showCompliance)}
/>
{!loading && customerData.name !== ANONYMOUS_USER_NAME && (
{!loading && !customerData.isAnonymous && (
<div>
<Label1 className={classes.actionLabel}>Actions</Label1>
<ActionButton