Skip to content
This repository was archived by the owner on Jun 9, 2023. It is now read-only.

Initial setup apollo on client #393

Merged
merged 16 commits into from
Aug 2, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move stuff around
  • Loading branch information
Zeko369 committed Aug 2, 2020
commit 47b15de19a2eee6b15a1393ad4a2f8eebdf1e242
20 changes: 0 additions & 20 deletions client/src/components/SomeComponent/__test__/Index.test.tsx

This file was deleted.

This file was deleted.

27 changes: 0 additions & 27 deletions client/src/components/SomeComponent/index.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion client/src/helpers/getLocationString.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ILocationModal } from 'client/store/types/locations';
import { ILocationModal } from '../modules/dashboard/Dashboard/Locations/node_modules/client/store/types/locations';

const getLocationString = (
location: ILocationModal,
Expand Down
2 changes: 1 addition & 1 deletion client/src/helpers/sanitizeFormData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const sanitizeFormData = (data: Obj): Obj => {
}

return prev;
}, {});
}, {} as Obj);
};

export default sanitizeFormData;
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
IEventFormData,
} from './EventFormUtils';
import { IEventModal } from 'client/store/types/events';
import useFormStyles from '../shared/formStyles';
import useFormStyles from '../../shared/components/formStyles';

const formatValue = (field: IField, store?: IEventModal): any => {
const { key } = field;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { useForm, Controller } from 'react-hook-form';
import { Button, TextField, FormControl } from '@material-ui/core';
import useFormStyles from '../shared/formStyles';
import useFormStyles from '../../shared/components/formStyles';

const fields = ['country_code', 'city', 'region', 'postal_code', 'address'];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import { ILocationModal } from 'client/store/types/locations';
import getLocationString from 'client/helpers/getLocationString';
import { IVenueModal } from 'client/store/types/venues';
import useFormStyles from '../shared/formStyles';
import useFormStyles from '../../shared/components/formStyles';

interface IData {
name: string;
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import Link from 'next/link';

import links from 'client/constants/DashboardLinks';
import { makeStyles } from '@material-ui/core';

import links from '../../../../constants/DashboardLinks';

const useStyles = makeStyles(() => ({
link: {
fontSize: '1rem',
Expand Down
7 changes: 5 additions & 2 deletions client/src/pages/dashboard/events/[id]/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ import { useSelector } from 'react-redux';
import { useRouter } from 'next/router';
import { makeStyles } from '@material-ui/core';

import { eventActions, venueActions } from 'client/store/actions';
import {
eventActions,
venueActions,
} from '../../../../modules/dashboard/Dashboard/Events/components/node_modules/client/store/actions';
import { AppStoreState } from 'client/store/reducers';
import useThunkDispatch from 'client/hooks/useThunkDispatch';
import useThunkDispatch from '../../../../modules/dashboard/Dashboard/Events/components/node_modules/client/hooks/useThunkDispatch';
import Skeleton from 'client/components/Dashboard/Events/Skeleton';
import { EventForm } from 'client/components/Dashboard/Events';
import Layout from 'client/components/Dashboard/shared/Layout';
Expand Down
11 changes: 7 additions & 4 deletions client/src/pages/dashboard/events/[id]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ import { useSelector } from 'react-redux';
import { Card, Typography, CardContent } from '@material-ui/core';
import { useRouter } from 'next/router';

import { eventActions, venueActions } from 'client/store/actions';
import {
eventActions,
venueActions,
} from '../../../../modules/dashboard/Dashboard/Events/components/node_modules/client/store/actions';
import { AppStoreState } from 'client/store/reducers';
import { ProgressCardContent } from 'client/components';
import useThunkDispatch from 'client/hooks/useThunkDispatch';
import { ProgressCardContent } from '../../../../modules/dashboard/Dashboard/Events/node_modules/client/components';
import useThunkDispatch from '../../../../modules/dashboard/Dashboard/Events/components/node_modules/client/hooks/useThunkDispatch';
import Skeleton from 'client/components/Dashboard/Events/Skeleton';
import Layout from 'client/components/Dashboard/shared/Layout';
import Tags from 'client/components/Dashboard/Events/components/Tag';
import getLocationString from 'client/helpers/getLocationString';
import getLocationString from '../../../../modules/dashboard/Dashboard/Venues/node_modules/client/helpers/getLocationString';
import Actions from 'client/components/Dashboard/Events/components/Actions';

const ShowEvent: React.FC = () => {
Expand Down
6 changes: 3 additions & 3 deletions client/src/pages/dashboard/events/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { useSelector } from 'react-redux';
import Link from 'next/link';

import { AppStoreState } from 'client/store/reducers';
import { eventActions } from 'client/store/actions';
import { IEventModal } from 'client/store/types/events';
import useThunkDispatch from 'client/hooks/useThunkDispatch';
import { eventActions } from '../../../modules/dashboard/Dashboard/Events/components/node_modules/client/store/actions';
import { IEventModal } from '../../../modules/dashboard/Dashboard/Events/node_modules/client/store/types/events';
import useThunkDispatch from '../../../modules/dashboard/Dashboard/Events/components/node_modules/client/hooks/useThunkDispatch';
import EventItem from 'client/components/Dashboard/Events/EventItem';
import Layout from 'client/components/Dashboard/shared/Layout';

Expand Down
7 changes: 5 additions & 2 deletions client/src/pages/dashboard/events/new.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ import React, { useEffect } from 'react';
import { useSelector } from 'react-redux';
import { useRouter } from 'next/router';

import { eventActions, venueActions } from 'client/store/actions';
import {
eventActions,
venueActions,
} from '../../../modules/dashboard/Dashboard/Events/components/node_modules/client/store/actions';
import EventForm from 'client/components/Dashboard/Events/EventForm';
import { IEventFormData } from 'client/components/Dashboard/Events/EventFormUtils';
import { AppStoreState } from 'client/store/reducers';
import useThunkDispatch from 'client/hooks/useThunkDispatch';
import useThunkDispatch from '../../../modules/dashboard/Dashboard/Events/components/node_modules/client/hooks/useThunkDispatch';
import { Skeleton } from 'client/components/Dashboard/Events';
import Layout from 'client/components/Dashboard/shared/Layout';

Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/dashboard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import Layout from 'client/components/Dashboard/shared/Layout';
import Layout from '../../modules/dashboard/shared/components/Layout';

const Dashboard: React.FC = () => {
return (
Expand Down
4 changes: 2 additions & 2 deletions client/src/pages/dashboard/locations/[id]/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { useSelector } from 'react-redux';
import { makeStyles } from '@material-ui/core';
import { useRouter } from 'next/router';

import { locationActions } from 'client/store/actions';
import { locationActions } from '../../../../modules/dashboard/Dashboard/Events/components/node_modules/client/store/actions';
import { AppStoreState } from 'client/store/reducers';
import sanitizeFormData from 'client/helpers/sanitizeFormData';
import useThunkDispatch from 'client/hooks/useThunkDispatch';
import useThunkDispatch from '../../../../modules/dashboard/Dashboard/Events/components/node_modules/client/hooks/useThunkDispatch';
import { LocationForm, Skeleton } from 'client/components/Dashboard/Locations';
import Layout from 'client/components/Dashboard/shared/Layout';

Expand Down
6 changes: 3 additions & 3 deletions client/src/pages/dashboard/locations/[id]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { useSelector } from 'react-redux';
import { Card, Typography } from '@material-ui/core';
import { useRouter } from 'next/router';

import { locationActions } from 'client/store/actions';
import { locationActions } from '../../../../modules/dashboard/Dashboard/Events/components/node_modules/client/store/actions';
import { AppStoreState } from 'client/store/reducers';
import { ProgressCardContent } from 'client/components';
import useThunkDispatch from 'client/hooks/useThunkDispatch';
import { ProgressCardContent } from '../../../../modules/dashboard/Dashboard/Events/node_modules/client/components';
import useThunkDispatch from '../../../../modules/dashboard/Dashboard/Events/components/node_modules/client/hooks/useThunkDispatch';
import Skeleton from 'client/components/Dashboard/Locations/Skeleton';
import Layout from 'client/components/Dashboard/shared/Layout';

Expand Down
6 changes: 3 additions & 3 deletions client/src/pages/dashboard/locations/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { Grid } from '@material-ui/core';
import { useSelector } from 'react-redux';
import Link from 'next/link';

import { locationActions } from 'client/store/actions';
import { locationActions } from '../../../modules/dashboard/Dashboard/Events/components/node_modules/client/store/actions';
import { AppStoreState } from 'client/store/reducers';
import { ILocationModal } from 'client/store/types/locations';
import useThunkDispatch from 'client/hooks/useThunkDispatch';
import { ILocationModal } from '../../../modules/dashboard/Dashboard/Locations/node_modules/client/store/types/locations';
import useThunkDispatch from '../../../modules/dashboard/Dashboard/Events/components/node_modules/client/hooks/useThunkDispatch';
import LocationItem from 'client/components/Dashboard/Locations/LocationItem';
import Layout from 'client/components/Dashboard/shared/Layout';

Expand Down
4 changes: 2 additions & 2 deletions client/src/pages/dashboard/locations/new.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { useSelector } from 'react-redux';
import { makeStyles } from '@material-ui/core';
import { useRouter } from 'next/router';

import { locationActions } from 'client/store/actions';
import { locationActions } from '../../../modules/dashboard/Dashboard/Events/components/node_modules/client/store/actions';
import { AppStoreState } from 'client/store/reducers';
import sanitizeFormData from 'client/helpers/sanitizeFormData';
import useThunkDispatch from 'client/hooks/useThunkDispatch';
import useThunkDispatch from '../../../modules/dashboard/Dashboard/Events/components/node_modules/client/hooks/useThunkDispatch';
import { LocationForm, Skeleton } from 'client/components/Dashboard/Locations';
import Layout from 'client/components/Dashboard/shared/Layout';

Expand Down
7 changes: 5 additions & 2 deletions client/src/pages/dashboard/venues/[id]/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ import { useSelector } from 'react-redux';
import { makeStyles } from '@material-ui/core';
import { useRouter } from 'next/router';

import { venueActions, locationActions } from 'client/store/actions';
import {
venueActions,
locationActions,
} from '../../../../modules/dashboard/Dashboard/Events/components/node_modules/client/store/actions';
import { AppStoreState } from 'client/store/reducers';
import { VenueForm, Skeleton } from 'client/components/Dashboard/Venues';
import sanitizeFormData from 'client/helpers/sanitizeFormData';
import useThunkDispatch from 'client/hooks/useThunkDispatch';
import useThunkDispatch from '../../../../modules/dashboard/Dashboard/Events/components/node_modules/client/hooks/useThunkDispatch';
import Layout from 'client/components/Dashboard/shared/Layout';

const useStyles = makeStyles(() => ({
Expand Down
6 changes: 3 additions & 3 deletions client/src/pages/dashboard/venues/[id]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { useSelector } from 'react-redux';
import { Card, Typography } from '@material-ui/core';
import { useRouter } from 'next/router';

import { venueActions } from 'client/store/actions';
import { venueActions } from '../../../../modules/dashboard/Dashboard/Events/components/node_modules/client/store/actions';
import { AppStoreState } from 'client/store/reducers';
import { ProgressCardContent } from 'client/components';
import useThunkDispatch from 'client/hooks/useThunkDispatch';
import { ProgressCardContent } from '../../../../modules/dashboard/Dashboard/Events/node_modules/client/components';
import useThunkDispatch from '../../../../modules/dashboard/Dashboard/Events/components/node_modules/client/hooks/useThunkDispatch';
import Skeleton from 'client/components/Dashboard/Venues/Skeleton';
import Layout from 'client/components/Dashboard/shared/Layout';

Expand Down
6 changes: 3 additions & 3 deletions client/src/pages/dashboard/venues/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { Grid } from '@material-ui/core';
import { useSelector } from 'react-redux';
import Link from 'next/link';

import { venueActions } from 'client/store/actions';
import { venueActions } from '../../../modules/dashboard/Dashboard/Events/components/node_modules/client/store/actions';
import { AppStoreState } from 'client/store/reducers';
import VenueItem from 'client/components/Dashboard/Venues/VenueItem';
import { IVenueModal } from 'client/store/types/venues';
import useThunkDispatch from 'client/hooks/useThunkDispatch';
import { IVenueModal } from '../../../modules/dashboard/Dashboard/Events/node_modules/client/store/types/venues';
import useThunkDispatch from '../../../modules/dashboard/Dashboard/Events/components/node_modules/client/hooks/useThunkDispatch';
import Layout from 'client/components/Dashboard/shared/Layout';

const Venues: React.FC = () => {
Expand Down
7 changes: 5 additions & 2 deletions client/src/pages/dashboard/venues/new.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ import { useSelector } from 'react-redux';
import { makeStyles } from '@material-ui/core';
import { useRouter } from 'next/router';

import { locationActions, venueActions } from 'client/store/actions';
import {
locationActions,
venueActions,
} from '../../../modules/dashboard/Dashboard/Events/components/node_modules/client/store/actions';
import { AppStoreState } from 'client/store/reducers';
import sanitizeFormData from 'client/helpers/sanitizeFormData';
import useThunkDispatch from 'client/hooks/useThunkDispatch';
import useThunkDispatch from '../../../modules/dashboard/Dashboard/Events/components/node_modules/client/hooks/useThunkDispatch';
import { VenueForm, Skeleton } from 'client/components/Dashboard/Venues/';
import Layout from 'client/components/Dashboard/shared/Layout';

Expand Down