Upgrade react-zen and migrate UI components to its updated APIs
This commit is contained in:
1 parent
f054830292
commit
6ac2b9377c
83 files changed
+1337
-506
No files matched your search
@@ -1,6 +1,9 @@
|
||||
'use client';
|
||||
import { useQueryClient } from '@tanstack/react-query';
|
||||
import {
|
||||
AlertBanner,
|
||||
Alert,
|
||||
AlertDescription,
|
||||
AlertTitle,
|
||||
Box,
|
||||
Button,
|
||||
Code,
|
||||
@@ -14,13 +17,12 @@ import {
|
||||
TagGroup,
|
||||
Text,
|
||||
} from '@umami/react-zen';
|
||||
import { useQueryClient } from '@tanstack/react-query';
|
||||
import { ReactNode, useEffect, useState } from 'react';
|
||||
import { LucideCopy } from 'lucide-react';
|
||||
import { type ReactNode, useEffect, useState } from 'react';
|
||||
import { OtpInput } from '@/components/common/OtpInput';
|
||||
import { useMessages, useUpdateQuery } from '@/components/hooks';
|
||||
import { TwoFactorSuccessModal } from './TwoFactorSuccessModal';
|
||||
import styles from './TwoFactorSetupModal.module.css';
|
||||
import { LucideCopy } from 'lucide-react';
|
||||
import { TwoFactorSuccessModal } from './TwoFactorSuccessModal';
|
||||
|
||||
function Step({
|
||||
tag,
|
||||
@@ -187,7 +189,12 @@ export function TwoFactorSetupModal({ required, onClose }: TwoFactorSetupModalPr
|
||||
</Column>
|
||||
</Step>
|
||||
|
||||
{error && <AlertBanner variant="error" title={t(messages.error)} description={error} />}
|
||||
{error && (
|
||||
<Alert variant="danger">
|
||||
<AlertTitle>{t(messages.error)}</AlertTitle>
|
||||
<AlertDescription>{error}</AlertDescription>
|
||||
</Alert>
|
||||
)}
|
||||
|
||||
<Row gap="2" justifyContent="flex-end">
|
||||
{!required && (
|
||||
|
||||
Reference in new issue
Block a user