diff --git a/apps/platform/src/components/shared/image.tsx b/apps/platform/src/components/shared/image.tsx index 6d95878..c8bbcb1 100644 --- a/apps/platform/src/components/shared/image.tsx +++ b/apps/platform/src/components/shared/image.tsx @@ -1,13 +1,24 @@ import type { ImgHTMLAttributes } from 'react' -type ImageProps = ImgHTMLAttributes +type ImageProps = ImgHTMLAttributes & { + /** Set on anything visible before the page is scrolled. */ + priority?: boolean +} -const Image = ({ src, ...rest }: ImageProps) => { +const Image = ({ src, priority = false, ...rest }: ImageProps) => { if (!src) { return null } - return + return ( + + ) } Image.displayName = 'Image' diff --git a/apps/platform/src/features/flow-editor/icons/provider-icons.tsx b/apps/platform/src/features/flow-editor/icons/provider-icons.tsx index 05f86f8..6a53261 100644 --- a/apps/platform/src/features/flow-editor/icons/provider-icons.tsx +++ b/apps/platform/src/features/flow-editor/icons/provider-icons.tsx @@ -2,6 +2,7 @@ import { useCallback } from 'react' import type { ReactNode } from 'react' import type { IconSource } from '@/features/flow-editor/types' +import { Image } from '@/components/shared/image' import { cn } from '@/lib/utils' import { useThemeStore } from '@/stores/theme-store' @@ -18,11 +19,10 @@ export type ProviderIconComponent = (props: IconProps) => ReactNode const builtIcons = new Map() const artwork = (source: string, className?: string) => ( - ) diff --git a/apps/platform/src/features/navigation/components/logo.tsx b/apps/platform/src/features/navigation/components/logo.tsx index 69fac2b..36dbe6b 100644 --- a/apps/platform/src/features/navigation/components/logo.tsx +++ b/apps/platform/src/features/navigation/components/logo.tsx @@ -26,6 +26,7 @@ const PlatformLogo = ({ width = 200, height = 40, className = '' }) => { return ( {t('ui.text.platformLogo')} ( const ImageOutput = ({ value }: { value: string }) => (
- {i18next.t('ui.text.dataOutput')}
diff --git a/apps/platform/src/layouts/auth-layout.tsx b/apps/platform/src/layouts/auth-layout.tsx index 3cbae58..3114c4c 100644 --- a/apps/platform/src/layouts/auth-layout.tsx +++ b/apps/platform/src/layouts/auth-layout.tsx @@ -24,6 +24,7 @@ const AuthLayout = () => {