auto-populate beta key

This commit is contained in:
Brandon Thomas committed 2024-06-20 23:47:55 -04:00
1 parent 48be4a119f
commit 09b1e920c1
2 files changed
+5 -3

No files matched your search

@@ -951,7 +951,7 @@ class PageContainer extends React.Component<
<RedeemSuccessPage />
</Route>
<Route path="/beta-key/redeem">
<Route path="/beta-key/redeem/:token?">
<RedeemBetaKeyPage />
</Route>
@@ -4,11 +4,13 @@ import "./BetaKey.scss";
import { faKey, faPersonWalkingArrowLoopLeft } from "@fortawesome/pro-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { RedeemBetaKey } from "@storyteller/components/src/api/beta_key/RedeemBetaKey";
import { Link, useHistory } from "react-router-dom";
import { Link, useHistory, useParams } from "react-router-dom";
import { useSession } from "hooks";
export default function RedeemBetaKeyPage() {
const [key, setKey] = useState("");
const { token: pageToken } = useParams<{ token: string }>();
const [key, setKey] = useState(pageToken || "");
const [loading, setLoading] = useState(false);
const [showAlert, setShowAlert] = useState(false);
const history = useHistory();