From 43d579744fe74db0c56465aa5c75f888c0692ff4 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 29 Apr 2022 19:25:00 +0100 Subject: [PATCH] Put PTT behind 'feature flag' AKA does the URL hash start with '#ptt' This will let us merge PTT back to the main branch --- .vscode/settings.json | 4 ++-- src/home/RegisteredView.jsx | 5 +++-- src/home/UnauthenticatedView.jsx | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index a681c9ef..ade50512 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { - "editor.formatOnSave": true, + "editor.formatOnSave": false, "editor.insertSpaces": true, "editor.tabSize": 2 -} \ No newline at end of file +} diff --git a/src/home/RegisteredView.jsx b/src/home/RegisteredView.jsx index 6849d9f6..9ef5b2a7 100644 --- a/src/home/RegisteredView.jsx +++ b/src/home/RegisteredView.jsx @@ -13,6 +13,7 @@ import { JoinExistingCallModal } from "./JoinExistingCallModal"; import { useHistory } from "react-router-dom"; import { Headline, Title } from "../typography/Typography"; import { Form } from "../form/Form"; +import { shouldShowPtt } from "../shouldShowPtt"; export function RegisteredView({ client }) { const [loading, setLoading] = useState(false); @@ -98,14 +99,14 @@ export function RegisteredView({ client }) { {loading ? "Loading..." : "Go"} - + {shouldShowPtt() && - + } {error && ( {error.message} diff --git a/src/home/UnauthenticatedView.jsx b/src/home/UnauthenticatedView.jsx index b39bfc76..005dc737 100644 --- a/src/home/UnauthenticatedView.jsx +++ b/src/home/UnauthenticatedView.jsx @@ -15,6 +15,7 @@ import { Form } from "../form/Form"; import styles from "./UnauthenticatedView.module.css"; import commonStyles from "./common.module.css"; import { generateRandomName } from "../auth/generateRandomName"; +import { shouldShowPtt } from "../shouldShowPtt"; export function UnauthenticatedView() { const [loading, setLoading] = useState(false); @@ -112,14 +113,14 @@ export function UnauthenticatedView() { autoComplete="off" /> - + {shouldShowPtt() && - + } By clicking "Go", you agree to our{" "} Terms and conditions