mirror of
https://github.com/plankanban/planka.git
synced 2025-12-25 17:25:01 +03:00
Move from prettier-eslint to eslint-plugin-prettier, update dependencies
This commit is contained in:
@@ -2,7 +2,7 @@ const ACCESS_TOKEN_KEY = 'accessToken';
|
||||
|
||||
export const getAccessToken = () => localStorage.getItem(ACCESS_TOKEN_KEY);
|
||||
|
||||
export const setAccessToken = (accessToken) => {
|
||||
export const setAccessToken = accessToken => {
|
||||
localStorage.setItem(ACCESS_TOKEN_KEY, accessToken);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export const createLocalId = () => `local:${Date.now()}`;
|
||||
|
||||
export const isLocalId = (id) => id.startsWith('local:');
|
||||
export const isLocalId = id => id.startsWith('local:');
|
||||
|
||||
@@ -16,17 +16,17 @@ export const updateTimer = ({ startedAt }, parts) => ({
|
||||
startedAt: startedAt && new Date(),
|
||||
});
|
||||
|
||||
export const startTimer = (timer) => ({
|
||||
export const startTimer = timer => ({
|
||||
startedAt: new Date(),
|
||||
total: timer ? timer.total : 0,
|
||||
});
|
||||
|
||||
export const stopTimer = (timer) => ({
|
||||
export const stopTimer = timer => ({
|
||||
startedAt: null,
|
||||
total: getFullSeconds(timer),
|
||||
});
|
||||
|
||||
export const getTimerParts = (timer) => {
|
||||
export const getTimerParts = timer => {
|
||||
const fullSeconds = getFullSeconds(timer);
|
||||
|
||||
const hours = Math.floor(fullSeconds / 3600);
|
||||
@@ -40,8 +40,8 @@ export const getTimerParts = (timer) => {
|
||||
};
|
||||
};
|
||||
|
||||
export const formatTimer = (timer) => {
|
||||
export const formatTimer = timer => {
|
||||
const { hours, minutes, seconds } = getTimerParts(timer);
|
||||
|
||||
return [hours, ...[minutes, seconds].map((part) => (part < 10 ? `0${part}` : part))].join(':');
|
||||
return [hours, ...[minutes, seconds].map(part => (part < 10 ? `0${part}` : part))].join(':');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user