Skip to content

Commit

Permalink
chore(suite): move 'reconnect troubleshooting tip' to a shared file
Browse files Browse the repository at this point in the history
  • Loading branch information
mroz22 committed Oct 30, 2024
1 parent 849e19c commit a54bdff
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { isDesktop } from '@trezor/env-utils';

import { Translation, TroubleshootingTips } from 'src/components/suite';
import { useDevice, useDispatch } from 'src/hooks/suite';
import { TROUBLESHOOTING_TIP_RECONNECT } from 'src/components/suite/troubleshooting/tips';

export const DeviceAcquire = () => {
const { isLocked, device } = useDevice();
Expand Down Expand Up @@ -53,19 +54,7 @@ export const DeviceAcquire = () => {
/>
),
},
{
key: 'device-reconnect',
heading: <Translation id="TR_RECONNECT_YOUR_DEVICE" />,
description: (
<Translation
id={
isDesktop()
? 'TR_RECONNECT_DEVICE_DESCRIPTION_DESKTOP'
: 'TR_RECONNECT_DEVICE_DESCRIPTION'
}
/>
),
},
TROUBLESHOOTING_TIP_RECONNECT,
];

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isWeb, isLinux, isAndroid } from '@trezor/env-utils';
import { isWeb, isDesktop, isLinux, isAndroid } from '@trezor/env-utils';

import { Translation } from 'src/components/suite/Translation';

Expand Down Expand Up @@ -57,3 +57,17 @@ export const TROUBLESHOOTING_TIP_UDEV = {
description: <UdevDescription />,
hide: !isLinux(),
};

export const TROUBLESHOOTING_TIP_RECONNECT = {
key: 'device-reconnect',
heading: <Translation id="TR_RECONNECT_YOUR_DEVICE" />,
description: (
<Translation
id={
isDesktop()
? 'TR_RECONNECT_DEVICE_DESCRIPTION_DESKTOP'
: 'TR_RECONNECT_DEVICE_DESCRIPTION'
}
/>
),
};

0 comments on commit a54bdff

Please sign in to comment.