Skip to content

Commit

Permalink
Merge pull request #448 from xmtp-labs/dj/mobile
Browse files Browse the repository at this point in the history
Update mobile view for onboarding screen
  • Loading branch information
daria-github authored Feb 27, 2024
2 parents c81080d + 3c2732d commit 6c5543f
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ import { useConnectModal } from "@rainbow-me/rainbowkit";
import { useClient } from "@xmtp/react-sdk";
import { useNavigate } from "react-router-dom";
import { OnboardingStep } from "../component-library/components/OnboardingStep/OnboardingStep";
import { classNames, isAppEnvDemo, wipeKeys } from "../helpers";
import {
TAILWIND_MD_BREAKPOINT,
classNames,
isAppEnvDemo,
wipeKeys,
} from "../helpers";
import useInitXmtpClient from "../hooks/useInitXmtpClient";
import { useXmtpStore } from "../store/xmtp";
import { Mobile } from "../component-library/components/Mobile/Mobile";
import useWindowSize from "../hooks/useWindowSize";

const OnboardingPage = () => {
const navigate = useNavigate();
Expand Down Expand Up @@ -47,7 +54,11 @@ const OnboardingPage = () => {
}
}, [status]);

return (
const size = useWindowSize();

return size[0] < TAILWIND_MD_BREAKPOINT ? (
<Mobile />
) : (
<div className={classNames("h-screen", "w-full", "overflow-auto")}>
<OnboardingStep
step={step}
Expand Down

0 comments on commit 6c5543f

Please sign in to comment.