Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React, { Component } from 'react';
import { Button, Col, ControlLabel, FormGroup, FormControl, Grid, InputGroup, PageHeader, Panel, Row } from 'react-bootstrap';
import * as emailValidator from 'email-validator';
import Tanker, { toBase64, fromBase64, errors } from '@tanker/client-browser';
import { getEntry, LogPanel } from './log';
const {
STOPPED,
READY,
IDENTITY_REGISTRATION_NEEDED,
IDENTITY_VERIFICATION_NEEDED
} = Tanker.statuses;
const serverRoot = `http://${window.location.hostname}:8080`;
const doRequest = (url, options = {}) => fetch(url, { credentials: 'include', ...options });
class App extends Component {
constructor() {
super();
this.state = {
email: '',
clearText: '',
encryptedText: '',
shareWith: '',
loading: true,
log: []
};