Use URLEncodeComponent.

This commit is contained in:
Matthew Stratford 2020-03-29 14:11:36 +01:00
parent b984d755e1
commit e06482cad7
2 changed files with 4 additions and 4 deletions

View file

@ -37,11 +37,11 @@ const SessionHandler: React.FC<{ }> = function () {
timeslotLoadError timeslotLoadError
} = useSelector((state: RootState) => state.session); } = useSelector((state: RootState) => state.session);
var redirect_url = encodeURI(window.location.toString()); var redirect_url = encodeURIComponent(window.location.toString());
if (currentUser === null) { if (currentUser === null) {
return ( return (
<div className="sp-container"> <div className="sp-container">
<h1>Getting User Data...</h1> <h1>Getting user data...</h1>
{(userLoading) && ( {(userLoading) && (
<b>Your data is loading, please wait just a second...</b> <b>Your data is loading, please wait just a second...</b>
)} )}

View file

@ -172,7 +172,7 @@ function NavBar() {
const dispatch = useDispatch(); const dispatch = useDispatch();
const sessionState = useSelector((state: RootState) => state.session); const sessionState = useSelector((state: RootState) => state.session);
const broadcastState = useSelector((state: RootState) => state.broadcast); const broadcastState = useSelector((state: RootState) => state.broadcast);
const redirect_url = encodeURI(window.location.toString()); const redirect_url = encodeURIComponent(window.location.toString());
return ( return (
<header className="navbar navbar-ury navbar-expand-md p-0 bd-navbar"> <header className="navbar navbar-ury navbar-expand-md p-0 bd-navbar">
<nav className="container"> <nav className="container">
@ -367,7 +367,7 @@ const Showplanner: React.FC<{ timeslotId: number }> = function({ timeslotId }) {
if (showplan === null) { if (showplan === null) {
return ( return (
<div className="sp-container"> <div className="sp-container">
<h1>Show Planner</h1> <h1>Getting show plan...</h1>
{planLoading && ( {planLoading && (
<b>Your plan is loading, please wait just a second...</b> <b>Your plan is loading, please wait just a second...</b>
)} )}