Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove waiting room #3334

Merged
merged 1 commit into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions packages/app-extension/src/components/Onboarding/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { Box, IconButton, ListItemText, Toolbar } from "@mui/material";

import { WithContaineredDrawer } from "../common/Layout/Drawer";
import { NAV_BAR_HEIGHT } from "../common/Layout/Nav";
import WaitingRoom from "../common/WaitingRoom";

import { OnboardAccount } from "./pages/OnboardAccount";
import { RecoverAccount } from "./pages/RecoverAccount";
Expand All @@ -31,9 +30,7 @@ export const Onboarding = ({
}) => {
const containerRef = useRef();
const [menuOpen, setMenuOpen] = useState(false);
const [action, setAction] = useState<"onboard" | "recover" | "waiting">(
"onboard"
);
const [action, setAction] = useState<"onboard" | "recover">("onboard");

const _ks = useKeyringStoreState();
const isOnboarded =
Expand Down Expand Up @@ -69,12 +66,10 @@ export const Onboarding = ({
<OnboardingProvider>
<OnboardAccount
onRecover={() => setAction("recover")}
onWaiting={() => setAction("waiting")}
{...defaultProps}
/>
</OnboardingProvider>
) : null}
{action === "waiting" ? <WaitingRoom /> : null}
{action === "recover" ? (
<OnboardingProvider>
<RecoverAccount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@ import { Box } from "@mui/material";
import { createPopup } from "@typeform/embed";

import { SubtextParagraph } from "../../common";
import { getWaitlistId, setWaitlistId } from "../../common/WaitingRoom";
import { BackpackHeader } from "../../Locked";

const WAITLIST_RES_ID_KEY = "waitlist-form-res-id";

export const setWaitlistId = (responseId: string) =>
window.localStorage.setItem(WAITLIST_RES_ID_KEY, responseId);

export const getWaitlistId = () =>
window.localStorage.getItem(WAITLIST_RES_ID_KEY) ?? undefined;

const useStyles = styles(() => ({
inviteCodeBox: {
"& .MuiFormControl-root": {
Expand All @@ -19,11 +26,9 @@ const useStyles = styles(() => ({

export const InviteCodeForm = ({
onClickRecover,
onClickWaiting,
onSubmit,
}: {
onClickRecover: () => void;
onClickWaiting: () => void;
onSubmit: (inviteCode: string) => void;
}) => {
const [error, setError] = useState("");
Expand Down Expand Up @@ -128,22 +133,15 @@ export const InviteCodeForm = ({
<Box style={{ marginTop: 24 }}>
{waitlistResponseId ? (
<SubtextParagraph
onClick={onClickWaiting}
style={{
cursor: "default",
textDecoration: "none",
display: "flex",
alignItems: "center",
justifyContent: "center",
}}
>
<img
src="/blue_ball.png"
height="20px"
width="20px"
style={{ marginRight: "4px" }}
/>
Waiting Room
<ArrowForward sx={{ marginLeft: "4px", fontSize: "18px" }} />
You're already on the waitlist
</SubtextParagraph>
) : (
<SubtextParagraph onClick={typeform.open}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@ import { NotificationsPermission } from "./NotificationsPermission";
import { UsernameForm } from "./UsernameForm";

export const OnboardAccount = ({
onWaiting,
onRecover,
containerRef,
navProps,
isAddingAccount,
isOnboarded,
}: {
onWaiting: () => void;
onRecover: () => void;
containerRef: any;
navProps: any;
Expand Down Expand Up @@ -70,7 +68,6 @@ export const OnboardAccount = ({
const steps = [
<InviteCodeForm
key="InviteCodeForm"
onClickWaiting={onWaiting}
onClickRecover={onRecover}
onSubmit={(inviteCode) => {
setOnboardingData({ inviteCode });
Expand Down
79 changes: 0 additions & 79 deletions packages/app-extension/src/components/common/WaitingRoom.tsx

This file was deleted.