diff --git a/web/src/components/ui/card/StatusCard.stories.tsx b/web/src/components/ui/card/StatusCard.stories.tsx index b9b0bd7fb..9f7033168 100644 --- a/web/src/components/ui/card/StatusCard.stories.tsx +++ b/web/src/components/ui/card/StatusCard.stories.tsx @@ -4,7 +4,7 @@ import { Button } from '../buttons'; import { fn } from '@storybook/test'; const meta: Meta = { - title: 'UI/Card/StatusCard', + title: 'UI/Cards/StatusCard', component: StatusCard, tags: ['autodocs'], argTypes: { diff --git a/web/src/components/ui/card/SuccessCard.stories.tsx b/web/src/components/ui/card/SuccessCard.stories.tsx index cc33f1f76..1272c8084 100644 --- a/web/src/components/ui/card/SuccessCard.stories.tsx +++ b/web/src/components/ui/card/SuccessCard.stories.tsx @@ -4,7 +4,7 @@ import { Button } from '../buttons/Button'; import { fn } from '@storybook/test'; const meta: Meta = { - title: 'UI/card/SuccessCard', + title: 'UI/Cards/SuccessCard', component: SuccessCard, parameters: { layout: 'centered' diff --git a/web/src/components/ui/indicators/StatusIndicator.stories.tsx b/web/src/components/ui/indicators/StatusIndicator.stories.tsx index 76477def4..e81cc2596 100644 --- a/web/src/components/ui/indicators/StatusIndicator.stories.tsx +++ b/web/src/components/ui/indicators/StatusIndicator.stories.tsx @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react'; import { StatusIndicator } from './StatusIndicator'; const meta = { - title: 'UI/StatusIndicator', + title: 'UI/Icons/StatusIndicator', component: StatusIndicator, parameters: { layout: 'centered' diff --git a/web/src/components/ui/indicators/StatusIndicator.tsx b/web/src/components/ui/indicators/StatusIndicator.tsx index 8e9f0cd0a..ee4085288 100644 --- a/web/src/components/ui/indicators/StatusIndicator.tsx +++ b/web/src/components/ui/indicators/StatusIndicator.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { AnimatePresence, motion } from 'framer-motion'; -import { RadioChecked, Radio, CircleWarning } from '../icons'; +import { RadioChecked, CircleWarning } from '../icons'; import { cn } from '@/lib/classMerge'; const animationConfig = { diff --git a/web/src/controllers/AppPasswordAccess.tsx b/web/src/controllers/AppPasswordAccess.tsx index 0fb25cca9..c65cf1f40 100644 --- a/web/src/controllers/AppPasswordAccess.tsx +++ b/web/src/controllers/AppPasswordAccess.tsx @@ -2,14 +2,12 @@ import { BusterLogo } from '@/assets/svg/BusterLogo'; import React, { useRef } from 'react'; -import { Title } from '@/components/ui/typography'; -import { Button, Input, InputRef, Typography } from 'antd'; -import { LoginConfigProvider } from '@/app/auth/_LoginComponents/LoginConfigProvider'; -import { ShareAssetType } from '@/api/asset_interfaces'; +import type { ShareAssetType } from '@/api/asset_interfaces'; import { useBusterAssetsContextSelector } from '@/context/Assets/BusterAssetsProvider'; import { useMemoizedFn } from 'ahooks'; - -const { Text } = Typography; +import { Title, Text } from '@/components/ui/typography'; +import { Button } from '@/components/ui/buttons'; +import { Input } from '@/components/ui/inputs'; export const AppPasswordAccess: React.FC<{ metricId?: string; @@ -43,7 +41,7 @@ const AppPasswordInputComponent: React.FC<{ dashboardId?: string; }> = ({ password, error, metricId, dashboardId }) => { const setAssetPassword = useBusterAssetsContextSelector((state) => state.setAssetPassword); - const inputRef = useRef(null); + const inputRef = useRef(null); const onEnterPassword = useMemoizedFn((v: string) => { setAssetPassword(metricId || dashboardId!, v); @@ -54,50 +52,48 @@ const AppPasswordInputComponent: React.FC<{ }); const onEnterButtonPress = useMemoizedFn(() => { - const value = inputRef.current?.input?.value; + const value = inputRef.current?.value; if (!value) return; onEnterPassword(value || ''); }); return ( - -
-
- +
+
+ -
- {`To access this page, enter the password below`} +
+ {`To access this page, enter the password below`} +
+ +
+
+ + {error ? ( + + {error} + + ) : null}
-
-
- - {error ? ( - - {error} - - ) : null} -
- - -
+
- +
); };