Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
17Amir17 committed Sep 25, 2024
1 parent 1d24cad commit 9a6cebd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
18 changes: 9 additions & 9 deletions apps/passport-client/new-components/screens/NewHomeScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChevronLeftIcon, ChevronRightIcon } from "@heroicons/react/24/solid";
import { EdDSATicketPCD } from "@pcd/eddsa-ticket-pcd";
import { AppContainer } from "../../components/shared/AppContainer";
import { usePCDs, useSelf } from "../../src/appHooks";
import { Spacer } from "@pcd/passport-ui";
import { PCD } from "@pcd/pcd-types";
import {
ReactElement,
Expand All @@ -9,14 +9,14 @@ import {
useRef,
useState
} from "react";
import { useNavigate } from "react-router-dom";
import styled, { css } from "styled-components";
import { TicketCard } from "../shared/TicketCard";
import { ChevronLeftIcon, ChevronRightIcon } from "@heroicons/react/24/solid";
import { Spacer } from "@pcd/passport-ui";
import { FloatingMenu } from "../shared/FloatingMenu";
import { SettingsBottomModal } from "../shared/SettingsBottomModal";
import { AppContainer } from "../../components/shared/AppContainer";
import { usePCDs, useSelf } from "../../src/appHooks";
import { useSyncE2EEStorage } from "../../src/useSyncE2EEStorage";
import { useNavigate } from "react-router-dom";
import { FloatingMenu } from "../shared/FloatingMenu";
import { SettingsBottomModal } from "../shared/Modals/SettingsBottomModal";
import { TicketCard } from "../shared/TicketCard";

const GAP = 4;
const isEventTicketPCD = (
Expand Down Expand Up @@ -128,7 +128,7 @@ export const NewHomeScreen = (): ReactElement => {
useEffect(() => {
if (!self) {
console.log("Redirecting to login screen");
navigate("/login", { replace: true });
navigate("/new/login", { replace: true });
}
});
useLayoutEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ export function SettingsBottomModal(): JSX.Element {
{
title: "Add Password",
icon: <EyeIcon width={24} height={24} color="#7C8BB4" />,
onClick: (): void => {}
onClick: (): void => {
dispatch({
type: "set-bottom-modal",
modal: { modalType: "add-password" }
});
}
},
!hasSetupPassword
),
Expand Down
4 changes: 2 additions & 2 deletions apps/passport-client/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ function RouterImpl(): JSX.Element {
<HashRouter>
<Routes>
<Route path="/new">
<Route path="/login" element={<NewLoginScreen />} />
<Route path="new-passport" element={<NewPassportScreen2 />} />
<Route index element={<NewHomeScreen />} />
<Route path="login" element={<NewLoginScreen />} />
<Route path="new-passport" element={<NewPassportScreen2 />} />
</Route>
<Route path="/">
<Route path="terms" element={<TermsScreen />} />
Expand Down

0 comments on commit 9a6cebd

Please sign in to comment.