mirror of
https://github.com/myfatemi04/wheelshare-frontend.git
synced 2025-04-21 11:20:17 -04:00
move several functions to the lib/ folder
This commit is contained in:
parent
c1f437cedd
commit
efeaf4b3d6
|
@ -1,4 +1,4 @@
|
||||||
import { lightgrey } from '../colors';
|
import { lightgrey } from '../../lib/colors';
|
||||||
import UIButton from '../UI/UIButton';
|
import UIButton from '../UI/UIButton';
|
||||||
import InvitationList from './InvitationList';
|
import InvitationList from './InvitationList';
|
||||||
import MailOutlineIcon from '@material-ui/icons/MailOutline';
|
import MailOutlineIcon from '@material-ui/icons/MailOutline';
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { useMemo } from 'react';
|
||||||
import { useContext } from 'react';
|
import { useContext } from 'react';
|
||||||
import { useInvitationState } from '../../state/Notifications/NotificationsHooks';
|
import { useInvitationState } from '../../state/Notifications/NotificationsHooks';
|
||||||
import { NotificationsContext } from '../../state/Notifications/NotificationsProvider';
|
import { NotificationsContext } from '../../state/Notifications/NotificationsProvider';
|
||||||
import { lightgrey } from '../colors';
|
import { lightgrey } from '../../lib/colors';
|
||||||
import { useMe } from '../hooks';
|
import { useMe } from '../hooks';
|
||||||
import UIButton from '../UI/UIButton';
|
import UIButton from '../UI/UIButton';
|
||||||
import { CarpoolContext } from './Carpool';
|
import { CarpoolContext } from './Carpool';
|
||||||
|
|
|
@ -4,7 +4,7 @@ import {
|
||||||
getEventSignups,
|
getEventSignups,
|
||||||
removeEventSignup,
|
removeEventSignup,
|
||||||
} from '../api';
|
} from '../api';
|
||||||
import { green, lightgrey } from '../colors';
|
import { green, lightgrey } from '../../lib/colors';
|
||||||
import { useMe } from '../hooks';
|
import { useMe } from '../hooks';
|
||||||
import { IEvent, IEventSignup } from '../types';
|
import { IEvent, IEventSignup } from '../types';
|
||||||
import UIButton from '../UI/UIButton';
|
import UIButton from '../UI/UIButton';
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import EmojiPeopleIcon from '@material-ui/icons/EmojiPeople';
|
import EmojiPeopleIcon from '@material-ui/icons/EmojiPeople';
|
||||||
import { useCallback, useMemo, useState } from 'react';
|
import { useCallback, useMemo, useState } from 'react';
|
||||||
import { createCarpool } from '../api';
|
import { createCarpool } from '../api';
|
||||||
import { lightgrey } from '../colors';
|
import { lightgrey } from '../../lib/colors';
|
||||||
import { useMe } from '../hooks';
|
import { useMe } from '../hooks';
|
||||||
import { IEvent } from '../types';
|
import { IEvent } from '../types';
|
||||||
import UIButton from '../UI/UIButton';
|
import UIButton from '../UI/UIButton';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import formatStartAndEndTime from '../dates';
|
import formatStartAndEndTime from '../../lib/dates';
|
||||||
import EventIcon from '@material-ui/icons/Event';
|
import EventIcon from '@material-ui/icons/Event';
|
||||||
import LocationOnIcon from '@material-ui/icons/LocationOn';
|
import LocationOnIcon from '@material-ui/icons/LocationOn';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import PersonAddIcon from '@material-ui/icons/PersonAdd';
|
import PersonAddIcon from '@material-ui/icons/PersonAdd';
|
||||||
import { useMe } from '../hooks';
|
import { useMe } from '../hooks';
|
||||||
import latlongdist, { R_miles } from '../latlongdist';
|
import latlongdist, { R_miles } from '../../lib/latlongdist';
|
||||||
import { IEventSignup, IEvent } from '../types';
|
import { IEventSignup, IEvent } from '../types';
|
||||||
import usePlace from '../usePlace';
|
import usePlace from '../usePlace';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Dispatch, SetStateAction, useCallback } from 'react';
|
import { Dispatch, SetStateAction, useCallback } from 'react';
|
||||||
import { toggleBit } from '../bits';
|
import { toggleBit } from '../../lib/bits';
|
||||||
import { green, lightgrey } from '../colors';
|
import { green, lightgrey } from '../../lib/colors';
|
||||||
|
|
||||||
const DAY_NAMES = [
|
const DAY_NAMES = [
|
||||||
'Sunday',
|
'Sunday',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
import { createEvent } from '../api';
|
import { createEvent } from '../api';
|
||||||
import { green, lightgrey } from '../colors';
|
import { green, lightgrey } from '../../lib/colors';
|
||||||
import { IGroup } from '../Group';
|
import { IGroup } from '../Group';
|
||||||
import UIButton from '../UI/UIButton';
|
import UIButton from '../UI/UIButton';
|
||||||
import UIDateInput from '../UI/UIDateInput';
|
import UIDateInput from '../UI/UIDateInput';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import { CSSProperties, useRef, useState } from 'react';
|
import { CSSProperties, useRef, useState } from 'react';
|
||||||
import PlacesAutocomplete, { Suggestion } from 'react-places-autocomplete';
|
import PlacesAutocomplete, { Suggestion } from 'react-places-autocomplete';
|
||||||
import getPlaceDetails from '../getPlaceDetails';
|
import getPlaceDetails from '../../lib/getPlaceDetails';
|
||||||
|
|
||||||
type Opts = Parameters<PlacesAutocomplete['props']['children']>['0'];
|
type Opts = Parameters<PlacesAutocomplete['props']['children']>['0'];
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { useState, useEffect, useCallback } from 'react';
|
import { useState, useEffect, useCallback } from 'react';
|
||||||
import getPlaceDetails, { PlaceDetails } from './getPlaceDetails';
|
import getPlaceDetails, { PlaceDetails } from '../lib/getPlaceDetails';
|
||||||
import useThrottle from './useThrottle';
|
import useThrottle from './useThrottle';
|
||||||
|
|
||||||
export default function usePlace(placeId: string | null) {
|
export default function usePlace(placeId: string | null) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user