Merge pull request #152 from UniversityRadioYork/mstratford-less-fixes
This commit is contained in:
commit
cf7276f23c
5 changed files with 38 additions and 14 deletions
|
@ -81,9 +81,10 @@ export function NavBar() {
|
|||
<a
|
||||
href="http://ury.org.uk/timelord/"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
let w = window.open(
|
||||
window.open(
|
||||
"http://ury.org.uk/timelord/",
|
||||
"URY - Timelord",
|
||||
"resizable,status"
|
||||
|
@ -167,7 +168,6 @@ export function NavBar() {
|
|||
}
|
||||
id="timeslotDropdown"
|
||||
data-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<FaRegClock />
|
||||
|
@ -207,7 +207,6 @@ export function NavBar() {
|
|||
href={MYRADIO_NON_API_BASE + "/Profile/default/"}
|
||||
id="dropdown07"
|
||||
data-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<FaRegUser />
|
||||
|
|
|
@ -2,7 +2,6 @@ import React, {
|
|||
useRef,
|
||||
useLayoutEffect,
|
||||
useEffect,
|
||||
useCallback,
|
||||
useState,
|
||||
HTMLProps,
|
||||
} from "react";
|
||||
|
|
|
@ -36,7 +36,7 @@ function PlayerNumbers({ id }: { id: number }) {
|
|||
]);
|
||||
}, 1000);
|
||||
return () => window.clearInterval(tickerRef.current);
|
||||
}, []);
|
||||
});
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
|
@ -42,6 +42,7 @@ import { OptionsMenu } from "../optionsMenu";
|
|||
import { WelcomeModal } from "./WelcomeModal";
|
||||
import { PisModal } from "./PISModal";
|
||||
import "./channel.scss";
|
||||
import Modal from "react-modal";
|
||||
|
||||
function Channel({ id, data }: { id: number; data: PlanItem[] }) {
|
||||
return (
|
||||
|
@ -196,6 +197,10 @@ const Showplanner: React.FC<{ timeslotId: number }> = function({ timeslotId }) {
|
|||
planSaveError,
|
||||
planSaving,
|
||||
} = useSelector((state: RootState) => state.showplan);
|
||||
|
||||
// Tell Modals that #root is the main page content, for accessability reasons.
|
||||
Modal.setAppElement("#root");
|
||||
|
||||
const session = useSelector((state: RootState) => state.session);
|
||||
|
||||
const [showWelcomeModal, setShowWelcomeModal] = useState(
|
||||
|
@ -237,7 +242,6 @@ const Showplanner: React.FC<{ timeslotId: number }> = function({ timeslotId }) {
|
|||
// TODO: this is ugly, should be in redux
|
||||
const data = CML_CACHE[result.draggableId];
|
||||
const newItem: TimeslotItem = {
|
||||
type: "central",
|
||||
timeslotitemid: "I" + insertIndex,
|
||||
channel: parseInt(result.destination.droppableId, 10),
|
||||
weight: result.destination.index,
|
||||
|
@ -250,7 +254,6 @@ const Showplanner: React.FC<{ timeslotId: number }> = function({ timeslotId }) {
|
|||
// TODO: this is ugly, should be in redux
|
||||
const data = AUX_CACHE[result.draggableId];
|
||||
const newItem: TimeslotItem = {
|
||||
type: "aux",
|
||||
timeslotitemid: "I" + insertIndex,
|
||||
channel: parseInt(result.destination.droppableId, 10),
|
||||
weight: result.destination.index,
|
||||
|
|
37
src/store.ts
37
src/store.ts
|
@ -1,5 +1,11 @@
|
|||
import raygun from "raygun4js";
|
||||
import { configureStore, Action, getDefaultMiddleware } from "@reduxjs/toolkit";
|
||||
import {
|
||||
configureStore,
|
||||
Action,
|
||||
getDefaultMiddleware,
|
||||
Middleware,
|
||||
Dispatch,
|
||||
} from "@reduxjs/toolkit";
|
||||
import rootReducer, { RootState } from "./rootReducer";
|
||||
import { ThunkAction } from "redux-thunk";
|
||||
import {
|
||||
|
@ -7,18 +13,35 @@ import {
|
|||
mixerKeyboardShortcutsMiddleware,
|
||||
startNewsTimer,
|
||||
} from "./mixer/state";
|
||||
import { persistStore } from "redux-persist";
|
||||
import {
|
||||
persistStore,
|
||||
FLUSH,
|
||||
REHYDRATE,
|
||||
PAUSE,
|
||||
PERSIST,
|
||||
PURGE,
|
||||
REGISTER,
|
||||
} from "redux-persist";
|
||||
|
||||
const raygunMiddleware: Middleware<{}, RootState, Dispatch<any>> = (store) => (
|
||||
next
|
||||
) => (action) => {
|
||||
raygun("recordBreadcrumb", "redux-action", action);
|
||||
return next(action);
|
||||
};
|
||||
|
||||
// See https://github.com/rt2zz/redux-persist/issues/988 for getDefaultMiddleware tweak.
|
||||
const store = configureStore({
|
||||
reducer: rootReducer,
|
||||
middleware: [
|
||||
mixerMiddleware,
|
||||
mixerKeyboardShortcutsMiddleware,
|
||||
(store) => (next) => (action) => {
|
||||
raygun("recordBreadcrumb", "redux-action", action);
|
||||
return next(action);
|
||||
},
|
||||
...getDefaultMiddleware(),
|
||||
raygunMiddleware,
|
||||
...getDefaultMiddleware({
|
||||
serializableCheck: {
|
||||
ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER],
|
||||
},
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue