1
0
mirror of https://github.com/pavlobu/deskreen.git synced 2025-05-19 00:40:11 -07:00

show "Connect Test Device" button in production for now

This commit is contained in:
Pavlo Buidenkov 2020-09-25 15:01:02 +03:00
parent 4bb91acecc
commit a12b87cf56

View File

@ -1,3 +1,4 @@
/* eslint-disable react/jsx-curly-brace-presence */
/* eslint-disable react/destructuring-assignment */ /* eslint-disable react/destructuring-assignment */
import React, { useContext } from 'react'; import React, { useContext } from 'react';
import { Button } from '@blueprintjs/core'; import { Button } from '@blueprintjs/core';
@ -78,25 +79,33 @@ export default function IntermediateStep(props: IntermediateStepProps) {
)} )}
{ {
// eslint-disable-next-line no-nested-ternary // // eslint-disable-next-line no-nested-ternary
process.env.NODE_ENV === 'production' && // process.env.NODE_ENV === 'production' &&
process.env.RUN_MODE !== 'dev' && // process.env.RUN_MODE !== 'dev' &&
process.env.RUN_MODE !== 'test' ? ( // process.env.RUN_MODE !== 'test' ? (
<></> // <></>
) : props.activeStep === 0 ? ( // ) : props.activeStep === 0 ? (
// // eslint-disable-next-line react/jsx-indent
// <Button
// onClick={() => {
// connectDevice(
// DEVICES[Math.floor(Math.random() * DEVICES.length)]
// );
// }}
// >
// Connect Test Device
// </Button>
// ) : (
// <></>
// )
// eslint-disable-next-line react/jsx-indent // eslint-disable-next-line react/jsx-indent
<Button <Button
onClick={() => { onClick={() => {
connectDevice( connectDevice(DEVICES[Math.floor(Math.random() * DEVICES.length)]);
DEVICES[Math.floor(Math.random() * DEVICES.length)]
);
}} }}
> >
Connect Test Device Connect Test Device
</Button> </Button>
) : (
<></>
)
} }
{ {
/**/ /**/