diff --git a/src/App.jsx b/src/App.jsx index 8ac7881..ced3174 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,4 +1,4 @@ -import ScheduleChooser from './ScheduleChooser.jsx'; +import ScheduleChooser from './Schedule/ScheduleChooser.jsx'; function App() { return (); diff --git a/src/Event.jsx b/src/Schedule/Event.jsx similarity index 100% rename from src/Event.jsx rename to src/Schedule/Event.jsx diff --git a/src/Schedule.jsx b/src/Schedule/Schedule.jsx similarity index 96% rename from src/Schedule.jsx rename to src/Schedule/Schedule.jsx index 0663527..e32534d 100644 --- a/src/Schedule.jsx +++ b/src/Schedule/Schedule.jsx @@ -1,10 +1,10 @@ import PropTypes from 'prop-types'; -import useSchedule from './hooks/useSchedule.js'; +import useSchedule from '../hooks/useSchedule.js'; import { getSpeakerName, isTrackHidden } from './utils.js'; import { Fragment } from 'react'; -import useScheduleTable from './hooks/useScheduleTable.js'; +import useScheduleTable from '../hooks/useScheduleTable.js'; import Event from './Event.jsx'; -import defaultSpeaker from './assets/default-speaker.png'; +import defaultSpeaker from '../assets/default-speaker.png'; import './Schedule.scss'; import { langs } from './constants.js'; diff --git a/src/Schedule.scss b/src/Schedule/Schedule.scss similarity index 97% rename from src/Schedule.scss rename to src/Schedule/Schedule.scss index 8e3350e..74a2536 100644 --- a/src/Schedule.scss +++ b/src/Schedule/Schedule.scss @@ -71,11 +71,11 @@ } .schedule-en::after { - background: url('./assets/en_US.png'); + background: url('../assets/en_US.png'); } .schedule-bg::after { - background: url('./assets/bg_BG.png'); + background: url('../assets/bg_BG.png'); } .schedule-avatar { diff --git a/src/ScheduleChooser.jsx b/src/Schedule/ScheduleChooser.jsx similarity index 100% rename from src/ScheduleChooser.jsx rename to src/Schedule/ScheduleChooser.jsx diff --git a/src/ScheduleLoader.jsx b/src/Schedule/ScheduleLoader.jsx similarity index 93% rename from src/ScheduleLoader.jsx rename to src/Schedule/ScheduleLoader.jsx index a742e4d..c1b7ee8 100644 --- a/src/ScheduleLoader.jsx +++ b/src/Schedule/ScheduleLoader.jsx @@ -1,4 +1,4 @@ -import useConferences from './hooks/useConferences.js'; +import useConferences from '../hooks/useConferences.js'; import Schedule from './Schedule.jsx'; import PropTypes from 'prop-types'; import { useMemo } from 'react'; diff --git a/src/constants.js b/src/Schedule/constants.js similarity index 100% rename from src/constants.js rename to src/Schedule/constants.js diff --git a/src/Schedule/utils.js b/src/Schedule/utils.js new file mode 100644 index 0000000..4c2dab7 --- /dev/null +++ b/src/Schedule/utils.js @@ -0,0 +1,3 @@ +export const getSpeakerName = speaker => speaker.first_name.concat(' ').concat(speaker.last_name); + +export const isTrackHidden = track => track.name.en === 'Other' || track.name.bg === 'Други'; diff --git a/src/utils.js b/src/utils.js index 3d04165..2908d74 100644 --- a/src/utils.js +++ b/src/utils.js @@ -9,10 +9,6 @@ function sorter(a, b, fieldFn) { export const dateSorter = key => (a, b) => sorter(a, b, item => Date.parse(item[key])); -export const getSpeakerName = speaker => speaker.first_name.concat(' ').concat(speaker.last_name); - -export const isTrackHidden = track => track.name.en === 'Other' || track.name.bg === 'Други'; - export function calculateProgress(...elements) { const totalCount = elements.length;