Temporarily disable access to platform

Due to unpaid invoices
This commit is contained in:
2022-10-28 15:35:24 +01:00
parent 4109515568
commit 866589f907
2 changed files with 45 additions and 0 deletions

View File

@@ -35,6 +35,7 @@ import "firebase/functions";
import "firebase/app-check"; import "firebase/app-check";
import "firebase/firestore"; import "firebase/firestore";
import "firebase/analytics"; import "firebase/analytics";
import PlatformDisabled from './PlatformDisabled';
// TODO: app check debug token set in index.html - remove before deploy // TODO: app check debug token set in index.html - remove before deploy
@@ -258,6 +259,15 @@ class App extends React.Component {
? ?
<> <>
<Switch> <Switch>
<Route path="/tos" exact>
<TermsOfService logEvent={analytics.logEvent} page={this.page} />
</Route>
<Route path="/privacy" exact>
<PrivacyPolicy logEvent={analytics.logEvent} page={this.page} />
</Route>
<Route path="/">
<PlatformDisabled logEvent={analytics.logEvent} page={this.page} />
</Route>
<Route path="/" exact> <Route path="/" exact>
<LoggedInHome db={db} firebase={firebase} functions={functions} user={this.state.user} logEvent={analytics.logEvent} page={this.page} /> <LoggedInHome db={db} firebase={firebase} functions={functions} user={this.state.user} logEvent={analytics.logEvent} page={this.page} />
</Route> </Route>

35
src/PlatformDisabled.js Normal file
View File

@@ -0,0 +1,35 @@
import { useEffect } from "react";
import { Link } from "react-router-dom";
import Footer from "./Footer";
import NavBar from "./NavBar";
const PlatformDisabled = (props) => {
useEffect(() => {
if (props.page) {
props.page.load();
return () => props.page.unload();
}
if (props.logEvent) props.logEvent("page_view");
}, [props, props.logEvent, props.page]);
return (
<>
<NavBar items={[]} />
<main>
<div className="description-section">
<h1>Your access to Parandum has been temporarily disabled</h1>
<p>
Apologies, but due to unpaid invoices by <Link to={{pathname: "https://reading-school.co.uk"}} target="_blank">Reading School</Link> you
are currently unable to access this platform. Please contact Mr M Cooper at{" "}
<Link to={{pathname: "mailto:mcooper@reading-school.co.uk"}} target="_blank">mcooper@reading-school.co.uk</Link> and{" "}
<Link to={{pathname: "mailto:finance@reading-school.co.uk"}} target="_blank">finance@reading-school.co.uk</Link> to regain access. If
you are a student at Reading School, please also discuss this with your language teacher.
</p>
</div>
</main>
<Footer />
</>
);
};
export default PlatformDisabled;