Reorganize and cleanup

This commit is contained in:
2020-08-22 01:08:18 +02:00
parent 52e04006df
commit 672044e905
21 changed files with 97 additions and 142 deletions

View File

@@ -1,13 +1,12 @@
import React from 'react';
import { DateTime } from 'luxon';
import { Icon, IconButton } from 'rsuite';
import FullCalendar from '@fullcalendar/react';
import dayGridPlugin from '@fullcalendar/daygrid';
import timeGridPlugin from '@fullcalendar/timegrid';
import interaction from '@fullcalendar/interaction';
import scrollGrid from '@fullcalendar/scrollgrid';
import { DateTime } from 'luxon';
import { Icon, IconButton } from 'rsuite';
// FullCalendar props
const dayMinWidth = 110;

View File

@@ -1,8 +1,8 @@
import React from 'react';
import { Header, Navbar, Nav } from 'rsuite';
import MenuDropdown from './MenuDropdown';
import Title from './../General/Title';
import Title from '../Title';
export default function NavBar({ title }) {
return (

View File

@@ -1,7 +1,7 @@
import React from 'react';
import { Redirect, Route } from 'react-router-dom';
import { useAuth } from '../../helpers/authContext';
import { useAuth } from '../helpers/authContext';
const PrivateRoute = ({ component: Component, ...rest }) => {
const { authToken } = useAuth();

View File

@@ -1,5 +1,6 @@
import React, {useState} from 'react';
import { InputGroup, Icon } from 'rsuite';
import { durations } from '../../assets/data/durations';
export default function DurationSelector() {

View File

@@ -1,5 +1,4 @@
import React from 'react';
import { Divider, Icon, IconButton } from 'rsuite';
export default function SelectedDates({ datesList, handleDelete }) {

View File

@@ -1,7 +1,8 @@
import React, { useState } from 'react';
import { timezones } from '../../assets/data/timezonesFlat';
import { InputPicker } from 'rsuite';
import { timezones } from '../assets/data/timezonesFlat';
export default function TimezonePicker() {
const [timezone, setTimezone] = useState('');
@@ -9,7 +10,7 @@ export default function TimezonePicker() {
<InputPicker
data={timezones}
// cleanable={false}
style={{ width: "100%" }}
style={{ width: '100%' }}
labelKey='timezone'
groupBy='area'
placeholder='type to search your timezone'

8
src/components/index.js Normal file
View File

@@ -0,0 +1,8 @@
export { default as PrivateRoute } from './PrivateRoute';
export { default as TimezonePicker } from './TimezonePicker';
export { default as IntervalSelector } from './IntervalSelector';
export { default as NavBar } from './Navbar/NavBar';
export { default as DaySelector } from './Schedule/DaySelector';
export { default as DurationSelector } from './Schedule/DurationSelector';
export { default as SelectedDates } from './Schedule/SelectedDates';