Fix
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import DialogBoxV2 from "@ente/shared/components/DialogBoxV2";
|
||||
import EnteButton from "@ente/shared/components/EnteButton";
|
||||
import { Button, Stack, Typography } from "@mui/material";
|
||||
import { Button, Stack, Typography, useMediaQuery } from "@mui/material";
|
||||
import { t } from "i18next";
|
||||
import { AppContext } from "pages/_app";
|
||||
import { useContext, useState } from "react";
|
||||
import { deletePasskey } from "services/passkeysService";
|
||||
import { PasskeysContext } from ".";
|
||||
@@ -13,12 +12,13 @@ interface IProps {
|
||||
}
|
||||
|
||||
const DeletePasskeyModal = (props: IProps) => {
|
||||
const { isMobile } = useContext(AppContext);
|
||||
const { selectedPasskey, setShowPasskeyDrawer } =
|
||||
useContext(PasskeysContext);
|
||||
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
const isMobile = useMediaQuery("(max-width: 428px)");
|
||||
|
||||
const doDelete = async () => {
|
||||
if (!selectedPasskey) return;
|
||||
setLoading(true);
|
||||
|
||||
@@ -2,7 +2,7 @@ import { EnteMenuItem } from "@ente/shared/components/Menu/EnteMenuItem";
|
||||
import ChevronRightIcon from "@mui/icons-material/ChevronRight";
|
||||
import KeyIcon from "@mui/icons-material/Key";
|
||||
import { useContext } from "react";
|
||||
import { Passkey } from "types/passkey";
|
||||
import type { Passkey } from "types/passkey";
|
||||
import { PasskeysContext } from ".";
|
||||
|
||||
interface IProps {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import MenuItemDivider from "@ente/shared/components/Menu/MenuItemDivider";
|
||||
import { MenuItemGroup } from "@ente/shared/components/Menu/MenuItemGroup";
|
||||
import { Fragment } from "react";
|
||||
import { Passkey } from "types/passkey";
|
||||
import type { Passkey } from "types/passkey";
|
||||
import PasskeyListItem from "./PasskeyListItem";
|
||||
|
||||
interface IProps {
|
||||
|
||||
@@ -15,9 +15,9 @@ import { t } from "i18next";
|
||||
import _sodium from "libsodium-wrappers";
|
||||
import { useEffect, useState } from "react";
|
||||
import {
|
||||
BeginPasskeyAuthenticationResponse,
|
||||
beginPasskeyAuthentication,
|
||||
finishPasskeyAuthentication,
|
||||
type BeginPasskeyAuthenticationResponse,
|
||||
} from "services/passkeysService";
|
||||
|
||||
const PasskeysFlow = () => {
|
||||
|
||||
@@ -11,7 +11,7 @@ import { useRouter } from "next/router";
|
||||
import { AppContext } from "pages/_app";
|
||||
import type { Dispatch, SetStateAction } from "react";
|
||||
import { createContext, useContext, useEffect, useState } from "react";
|
||||
import { Passkey } from "types/passkey";
|
||||
import type { Passkey } from "types/passkey";
|
||||
import {
|
||||
finishPasskeyRegistration,
|
||||
getPasskeyRegistrationOptions,
|
||||
|
||||
Reference in New Issue
Block a user