mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-09 19:41:32 +00:00
auto-populate beta key
This commit is contained in:
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();
|
||||
|
||||
Reference in new issue
Block a user