Skip to content

Commit

Permalink
fix(mosip#576): [Bhargavi|Adityan] add conditions to display tuvali v…
Browse files Browse the repository at this point in the history
…ersion in profilescreen
  • Loading branch information
PuBHARGAVI committed Feb 24, 2023
1 parent bc9f0d8 commit d811ae4
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions screens/Profile/ProfileScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ export const ProfileScreen: React.FC<MainRouteProps> = (props) => {
const dependencyData = dependencies[dependencyName];

if (dependencyName == 'react-native-openid4vp-ble') {
packageVersion = dependencyData.from.split('#')[1];
packageCommitId = dependencyData.version.split('#')[1].substring(0, 7);
packageVersion = dependencyData.from
? dependencyData.from.split('#')[1]
: 'unknown';
if (packageVersion != 'unknown') {
packageCommitId = dependencyData.version.split('#')[1].substring(0, 7);
}
}
});

Expand Down Expand Up @@ -144,14 +148,16 @@ export const ProfileScreen: React.FC<MainRouteProps> = (props) => {
color={Theme.Colors.profileVersion}>
{t('version')}: {getVersion()}
</Text>
<Text
weight="semibold"
margin="32 0 0 0"
align="center"
size="smaller"
color={Theme.Colors.profileVersion}>
{t('tuvali-version')}: {packageVersion + '-' + packageCommitId}
</Text>
{packageVersion != 'unknown' && (
<Text
weight="semibold"
margin="32 0 0 0"
align="center"
size="smaller"
color={Theme.Colors.profileVersion}>
{t('tuvali-version')}: {packageVersion + '-' + packageCommitId}
</Text>
)}
{controller.backendInfo.application.name !== '' ? (
<View>
<Text
Expand Down

0 comments on commit d811ae4

Please sign in to comment.