// @flow import React from 'react'; import { Form, FormField } from 'component/common/form'; import Button from 'component/button'; import Card from 'component/common/card'; import { setSavedPassword } from 'util/saved-passwords'; import usePersistedState from 'effects/use-persisted-state'; type Props = { getSync: (?string) => void, getSyncIsPending: boolean, }; function SyncPassword(props: Props) { const { getSync, getSyncIsPending } = props; const [password, setPassword] = React.useState(''); const [rememberPassword, setRememberPassword] = usePersistedState(true); function handleSubmit() { setSavedPassword(password, rememberPassword); getSync(password); } return (
); } export default SyncPassword;