challenges files structure refactor
This commit is contained in:
parent
84160ce939
commit
6c65af9bd7
@ -1,4 +1,4 @@
|
||||
import CHALLENGES_ACTION from '../pages/Challanges/ChallengesActionEnum';
|
||||
import CHALLENGES_ACTION from '../pages/Challanges/model/ChallengesActionEnum';
|
||||
import { API } from '../utils/globals';
|
||||
|
||||
const getChallenges = (dispatch) => {
|
||||
|
@ -6,7 +6,7 @@ import styled from 'styled-components';
|
||||
import FilterBy from '../FilterBy';
|
||||
import filterOptions from './filterOptions';
|
||||
import Media from 'react-media';
|
||||
import CHALLENGES_ACTION from '../../../pages/Challanges/ChallengesActionEnum';
|
||||
import CHALLENGES_ACTION from '../../../pages/Challanges/model/ChallengesActionEnum';
|
||||
|
||||
const FiltersMenuStyle = styled(FlexColumn)`
|
||||
position: fixed;
|
||||
|
@ -4,12 +4,12 @@ import theme from '../../utils/theme';
|
||||
import getChallenges from '../../api/getChallenges';
|
||||
import { CHALLENGES_STATUS_FILTER } from '../../utils/globals';
|
||||
import FiltersMenu from '../../components/challenges_list/FiltersMenu';
|
||||
import statusFilterHandle from './statusFilterHandle';
|
||||
import ChallengesMobile from './ChallengesMobile';
|
||||
import ChallengesDesktop from './ChallengesDesktop';
|
||||
import challengeSearchQueryHandler from './challengeSearchQueryHandler';
|
||||
import ChallengesReducer from './ChallengesReducer';
|
||||
import CHALLENGES_ACTION from './ChallengesActionEnum';
|
||||
import statusFilterHandle from './functions/statusFilterHandle';
|
||||
import ChallengesMobile from './components/ChallengesMobile';
|
||||
import ChallengesDesktop from './components/ChallengesDesktop';
|
||||
import challengeSearchQueryHandler from './functions/challengeSearchQueryHandler';
|
||||
import ChallengesReducer from './model/ChallengesReducer';
|
||||
import CHALLENGES_ACTION from './model/ChallengesActionEnum';
|
||||
|
||||
const Challenges = () => {
|
||||
const [state, dispatch] = React.useReducer(ChallengesReducer, {
|
||||
|
@ -1,14 +1,14 @@
|
||||
import React from 'react';
|
||||
import ChallengesStyle from './ChallengesStyle';
|
||||
import { FlexColumn, FlexRow } from '../../utils/containers';
|
||||
import Pager from '../../components/generic/Pager';
|
||||
import { H1, Body } from '../../utils/fonts';
|
||||
import Search from '../../components/generic/Search';
|
||||
import { CALC_PAGES } from '../../utils/globals';
|
||||
import renderChallenges from './renderChallenges';
|
||||
import Loading from '../../components/generic/Loading';
|
||||
import cupIco from '../../assets/cup_ico.svg';
|
||||
import { Svg } from '../../utils/containers';
|
||||
import ChallengesStyle from '../ChallengesStyle';
|
||||
import { FlexColumn, FlexRow } from '../../../utils/containers';
|
||||
import Pager from '../../../components/generic/Pager';
|
||||
import { H1, Body } from '../../../utils/fonts';
|
||||
import Search from '../../../components/generic/Search';
|
||||
import { CALC_PAGES } from '../../../utils/globals';
|
||||
import renderChallenges from '../functions/renderChallenges';
|
||||
import Loading from '../../../components/generic/Loading';
|
||||
import cupIco from '../../../assets/cup_ico.svg';
|
||||
import { Svg } from '../../../utils/containers';
|
||||
|
||||
const ChallengesDesktop = (props) => {
|
||||
return (
|
@ -1,13 +1,13 @@
|
||||
import React from 'react';
|
||||
import ChallengesStyle from './ChallengesStyle';
|
||||
import { FlexColumn } from '../../utils/containers';
|
||||
import Pager from '../../components/generic/Pager';
|
||||
import { H1 } from '../../utils/fonts';
|
||||
import Search from '../../components/generic/Search';
|
||||
import { CALC_PAGES } from '../../utils/globals';
|
||||
import renderChallenges from './renderChallenges';
|
||||
import Loading from '../../components/generic/Loading';
|
||||
import CHALLENGES_ACTION from './ChallengesActionEnum';
|
||||
import ChallengesStyle from '../ChallengesStyle';
|
||||
import { FlexColumn } from '../../../utils/containers';
|
||||
import Pager from '../../../components/generic/Pager';
|
||||
import { H1 } from '../../../utils/fonts';
|
||||
import Search from '../../../components/generic/Search';
|
||||
import { CALC_PAGES } from '../../../utils/globals';
|
||||
import renderChallenges from '../functions/renderChallenges';
|
||||
import Loading from '../../../components/generic/Loading';
|
||||
import CHALLENGES_ACTION from '../model/ChallengesActionEnum';
|
||||
|
||||
const ChallengesMobile = (props) => {
|
||||
return (
|
@ -1,4 +1,4 @@
|
||||
import CHALLENGES_ACTION from './ChallengesActionEnum';
|
||||
import CHALLENGES_ACTION from '../model/ChallengesActionEnum';
|
||||
|
||||
const challengeSearchQueryHandler = (event, challengesFromAPI, dispatch) => {
|
||||
let searchQuery = event.target.value;
|
@ -1,6 +1,6 @@
|
||||
import { ELEMENTS_PER_PAGE } from '../../utils/globals';
|
||||
import MiniChallenge from '../../components/challenges_list/MiniChallenge';
|
||||
import { Grid } from '../../utils/containers';
|
||||
import { ELEMENTS_PER_PAGE } from '../../../utils/globals';
|
||||
import MiniChallenge from '../../../components/challenges_list/MiniChallenge';
|
||||
import { Grid } from '../../../utils/containers';
|
||||
import styled from 'styled-components';
|
||||
|
||||
const ChallengesGrid = styled(Grid)`
|
@ -1,5 +1,5 @@
|
||||
import { CHALLENGES_STATUS_FILTER } from '../../utils/globals';
|
||||
import CHALLENGES_ACTION from './ChallengesActionEnum';
|
||||
import { CHALLENGES_STATUS_FILTER } from '../../../utils/globals';
|
||||
import CHALLENGES_ACTION from '../model/ChallengesActionEnum';
|
||||
|
||||
const dateIsOlder = (newerDate, olderDate) => {
|
||||
if (newerDate.year > olderDate.year) return true;
|
Loading…
Reference in New Issue
Block a user