diff --git a/src/app/components/Indicator/Indicator.tsx b/src/app/components/Indicator/Indicator.tsx index 6a41875..b0a37b1 100644 --- a/src/app/components/Indicator/Indicator.tsx +++ b/src/app/components/Indicator/Indicator.tsx @@ -1,31 +1,48 @@ -import * as React from "react"; -import "./indicator.css"; +import * as React from 'react' +import './indicator.css' // @ts-ignore -import check from "../../icons/check.png"; -import { launchPiecesOS } from "../../utils/launchPiecesOS"; +import check from '../../icons/check.png' +import { launchPiecesOS } from '../../utils/launchPiecesOS' +import useVersion from '../../utils/useVersion' interface IndicatorProps { - isConnected: boolean; + isConnected: boolean } -// this is your indicator badge that we will manipulate through the initial connect call. it will either -// be green or red depending on the current status. -export const Indicator = React.memo(({ isConnected }: IndicatorProps): React.JSX.Element => { - const osVersion = localStorage.getItem("version"); + +export function Indicator({ isConnected }: IndicatorProps): React.JSX.Element { + const osVersion = useVersion('version') return ( <> -