Client - lint fix after prettier update
This commit is contained in:
parent
5b49928c84
commit
2fd2cd5c16
@ -45,12 +45,9 @@ export const updateUsersData = data => ({
|
||||
data,
|
||||
})
|
||||
|
||||
export const getOrUpdateData = (
|
||||
action,
|
||||
target,
|
||||
data,
|
||||
canDispatch = true
|
||||
) => dispatch => {
|
||||
export const getOrUpdateData =
|
||||
(action, target, data, canDispatch = true) =>
|
||||
dispatch => {
|
||||
dispatch(setLoading(true))
|
||||
if (data && data.id && target !== 'workouts' && isNaN(data.id)) {
|
||||
dispatch(setLoading(false))
|
||||
@ -62,7 +59,9 @@ export const getOrUpdateData = (
|
||||
if (ret.status === 'success') {
|
||||
if (canDispatch) {
|
||||
if (target === 'users' && action === 'getData') {
|
||||
return dispatch(setPaginatedData(target, ret.data, ret.pagination))
|
||||
return dispatch(
|
||||
setPaginatedData(target, ret.data, ret.pagination)
|
||||
)
|
||||
}
|
||||
dispatch(setData(target, ret.data))
|
||||
} else if (action === 'updateData' && target === 'sports') {
|
||||
|
@ -154,7 +154,9 @@ export const deletePicture = () => dispatch =>
|
||||
throw error
|
||||
})
|
||||
|
||||
export const deleteUser = (username, isAdmin = false) => dispatch =>
|
||||
export const deleteUser =
|
||||
(username, isAdmin = false) =>
|
||||
dispatch =>
|
||||
FitTrackeeGenericApi.deleteData('users', username)
|
||||
.then(ret => {
|
||||
if (ret.status === 204) {
|
||||
|
@ -57,15 +57,8 @@ class AdminUsers extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
authUser,
|
||||
location,
|
||||
message,
|
||||
t,
|
||||
pagination,
|
||||
updateUser,
|
||||
users,
|
||||
} = this.props
|
||||
const { authUser, location, message, t, pagination, updateUser, users } =
|
||||
this.props
|
||||
const translatedFilters = translateValues(t, userFilters)
|
||||
const translatedSortOrders = translateValues(t, sortOrders)
|
||||
return (
|
||||
|
@ -26,15 +26,8 @@ class DashBoard extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
loadMoreWorkouts,
|
||||
message,
|
||||
records,
|
||||
sports,
|
||||
t,
|
||||
user,
|
||||
workouts,
|
||||
} = this.props
|
||||
const { loadMoreWorkouts, message, records, sports, t, user, workouts } =
|
||||
this.props
|
||||
const paginationEnd =
|
||||
workouts.length > 0
|
||||
? workouts[workouts.length - 1].previous_workout === null
|
||||
|
@ -61,13 +61,8 @@ class ProfileEdit extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
message,
|
||||
onDeleteUser,
|
||||
onHandleProfileFormSubmit,
|
||||
t,
|
||||
user,
|
||||
} = this.props
|
||||
const { message, onDeleteUser, onHandleProfileFormSubmit, t, user } =
|
||||
this.props
|
||||
const { displayModal, formData } = this.state
|
||||
return (
|
||||
<div>
|
||||
|
@ -5,16 +5,8 @@ import { getDateWithTZ } from '../../../utils'
|
||||
import { formatWorkoutDate } from '../../../utils/workouts'
|
||||
|
||||
export default function WorkoutCardHeader(props) {
|
||||
const {
|
||||
dataType,
|
||||
displayModal,
|
||||
segmentId,
|
||||
sport,
|
||||
t,
|
||||
title,
|
||||
user,
|
||||
workout,
|
||||
} = props
|
||||
const { dataType, displayModal, segmentId, sport, t, title, user, workout } =
|
||||
props
|
||||
const workoutDate = workout
|
||||
? formatWorkoutDate(getDateWithTZ(workout.workout_date, user.timezone))
|
||||
: null
|
||||
|
Loading…
Reference in New Issue
Block a user