mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 13:19:44 +02:00
Add email and password change functionality for a current user, remove deep compare hooks
This commit is contained in:
parent
b53e5bf94c
commit
680d664279
67 changed files with 1232 additions and 267 deletions
|
@ -1,11 +1,11 @@
|
|||
import dequal from 'dequal';
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import React, { useCallback, useEffect, useRef } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Button, Form } from 'semantic-ui-react';
|
||||
import { Input, Popup } from '../../lib/custom-ui';
|
||||
|
||||
import { useDeepCompareCallback, useForm, useToggle } from '../../hooks';
|
||||
import { useForm, useToggle } from '../../hooks';
|
||||
import {
|
||||
createTimer, getTimerParts, startTimer, stopTimer, updateTimer,
|
||||
} from '../../utils/timer';
|
||||
|
@ -41,16 +41,16 @@ const EditTimerStep = React.memo(({
|
|||
const minutesField = useRef(null);
|
||||
const secondsField = useRef(null);
|
||||
|
||||
const handleStartClick = useDeepCompareCallback(() => {
|
||||
const handleStartClick = useCallback(() => {
|
||||
onUpdate(startTimer(defaultValue));
|
||||
onClose();
|
||||
}, [defaultValue, onUpdate, onClose]);
|
||||
|
||||
const handleStopClick = useDeepCompareCallback(() => {
|
||||
const handleStopClick = useCallback(() => {
|
||||
onUpdate(stopTimer(defaultValue));
|
||||
}, [defaultValue, onUpdate]);
|
||||
|
||||
const handleClearClick = useDeepCompareCallback(() => {
|
||||
const handleClearClick = useCallback(() => {
|
||||
if (defaultValue) {
|
||||
onUpdate(null);
|
||||
}
|
||||
|
@ -58,12 +58,12 @@ const EditTimerStep = React.memo(({
|
|||
onClose();
|
||||
}, [defaultValue, onUpdate, onClose]);
|
||||
|
||||
const handleToggleEditClick = useDeepCompareCallback(() => {
|
||||
const handleToggleEditClick = useCallback(() => {
|
||||
setData(createData(defaultValue));
|
||||
toggleEdit();
|
||||
}, [defaultValue, setData, toggleEdit]);
|
||||
|
||||
const handleSubmit = useDeepCompareCallback(() => {
|
||||
const handleSubmit = useCallback(() => {
|
||||
const parts = {
|
||||
hours: parseInt(data.hours, 10),
|
||||
minutes: parseInt(data.minutes, 10),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue