|
|
|
@ -15,14 +15,16 @@ interface IAccountTitleAtomProps {
@@ -15,14 +15,16 @@ interface IAccountTitleAtomProps {
|
|
|
|
|
export const AccountTitleAtom = (props: IAccountTitleAtomProps) => { |
|
|
|
|
const { styles } = useTheme(createStyles) |
|
|
|
|
const getSubText = () => { |
|
|
|
|
if (props.myFactoryName) |
|
|
|
|
return `${props.myFactoryName}, ${props.position}` |
|
|
|
|
else return props.position |
|
|
|
|
if (props.myFactoryName) { |
|
|
|
|
if (props.position) |
|
|
|
|
return `${props.myFactoryName}, ${props.position}` |
|
|
|
|
return props.myFactoryName |
|
|
|
|
} else return props.position ? props.position : '' |
|
|
|
|
} |
|
|
|
|
return ( |
|
|
|
|
<View style={styles.titleWrap}> |
|
|
|
|
<Txt style={styles.title}> |
|
|
|
|
{`${props.firstName} ${props.lastName}`} |
|
|
|
|
{`${props.firstName || ''} ${props.lastName || ''}`} |
|
|
|
|
</Txt> |
|
|
|
|
<Txt style={styles.description}>{getSubText()}</Txt> |
|
|
|
|
</View> |
|
|
|
|