diff --git a/fbw-a32nx/src/systems/instruments/src/EFB/Settings/Pages/ThirdPartyOptionsPage.tsx b/fbw-a32nx/src/systems/instruments/src/EFB/Settings/Pages/ThirdPartyOptionsPage.tsx index 9cba01edcbee..8024dd5eb8e2 100644 --- a/fbw-a32nx/src/systems/instruments/src/EFB/Settings/Pages/ThirdPartyOptionsPage.tsx +++ b/fbw-a32nx/src/systems/instruments/src/EFB/Settings/Pages/ThirdPartyOptionsPage.tsx @@ -6,6 +6,7 @@ import React, { useEffect, useState } from 'react'; import { NavigraphSubscriptionStatus, usePersistentNumberProperty, usePersistentProperty } from '@flybywiresim/fbw-sdk'; import { Route, Switch, useHistory } from 'react-router-dom'; import { toast } from 'react-toastify'; +import { IconTrash } from '@tabler/icons'; import { Toggle } from '../../UtilComponents/Form/Toggle'; import { FullscreenSettingsPage, SettingItem, SettingsPage } from '../Settings'; import { t } from '../../translation'; @@ -74,7 +75,7 @@ export const ThirdPartyOptionsPage = () => { }); }); - const handleUsernameInput = (value: string) => { + const handleOverrideSimbriefIDInput = (value: string) => { getSimbriefUserId(value).then((response) => { toast.success(`${t('Settings.ThirdPartyOptions.YourSimBriefPilotIdHasBeenValidatedAndUpdatedTo')} ${response}`); @@ -86,6 +87,11 @@ export const ThirdPartyOptionsPage = () => { }); }; + const handleOverrideSimBriefIDDelete = () => { + setOverrideSimbriefUserID(''); + setOverrideSimbriefDisplay(''); + }; + const handleNavigraphAccountSuccessfulLink = () => { history.push('/settings/3rd-party-options'); }; @@ -136,12 +142,22 @@ export const ThirdPartyOptionsPage = () => { - handleUsernameInput(value.replace(/\s/g, ''))} - onChange={(value) => setOverrideSimbriefDisplay(value)} - /> +
+ handleOverrideSimbriefIDInput(value.replace(/\s/g, ''))} + onChange={(value) => setOverrideSimbriefDisplay(value)} + /> + +
+ +
+