mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2025-12-18 10:52:17 +01:00
33 lines
624 B
TypeScript
33 lines
624 B
TypeScript
import AppState from "../AppState";
|
|
import React from "react";
|
|
|
|
type IndicatorsProps = {
|
|
appState: AppState
|
|
};
|
|
|
|
function Indicators(props: IndicatorsProps) {
|
|
|
|
const list = [];
|
|
const state = props.appState;
|
|
|
|
if(props.appState.env != 'prod') {
|
|
list.push(state.env);
|
|
}
|
|
|
|
if(props.appState.debugMode) {
|
|
list.push("debug");
|
|
}
|
|
|
|
if(localStorage.getItem('TrackAnalytics') === 'false') {
|
|
list.push("notrack");
|
|
}
|
|
|
|
if(list.length == 0)
|
|
return null;
|
|
|
|
return <div>
|
|
{list.map(i => <span>{i} </span>)}
|
|
</div>
|
|
}
|
|
|
|
export default Indicators; |