-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
78dd21a
commit fd9d2ca
Showing
49 changed files
with
425 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import Typography from '../Typography/Typography' | ||
import { useTranslation } from 'react-i18next' | ||
import { useRecoilValue } from 'recoil' | ||
import { activeDevice } from '../../recoil/atoms' | ||
import { DEVICE_NAME_TRUNCATE } from '../../constants/constants' | ||
|
||
const DeviceName = () => { | ||
const { t } = useTranslation() | ||
const device = useRecoilValue(activeDevice) | ||
|
||
return ( | ||
<div | ||
data-testid='beaconNetwork' | ||
className='flex flex-col h-full py-1.5 pl-2 pr-4 justify-between border-l border-r border-borderLight dark:border-borderDark' | ||
> | ||
<Typography type='text-tiny' darkMode='dark:text-white' isUpperCase isBold> | ||
{t('device')} | ||
</Typography> | ||
{device?.deviceName && ( | ||
<Typography | ||
type='text-tiny' | ||
family='font-roboto' | ||
color='text-primary' | ||
darkMode='dark:text-primary' | ||
isUpperCase | ||
isBold | ||
> | ||
{device.deviceName.length < DEVICE_NAME_TRUNCATE | ||
? device.deviceName | ||
: `${device.deviceName.substring(0, DEVICE_NAME_TRUNCATE)}...`} | ||
</Typography> | ||
)} | ||
</div> | ||
) | ||
} | ||
|
||
export default DeviceName |
Oops, something went wrong.