@ -2,10 +2,10 @@ import { useTheme } from '@emotion/react';
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
import { IconArchive, IconDotsVertical, IconPencil } from '@/ui/display/icon';
|
||||
import { useIcons } from '@/ui/display/icon/hooks/useIcons';
|
||||
import { Tag } from '@/ui/display/tag/components/Tag';
|
||||
import { H2Title } from '@/ui/display/typography/components/H2Title';
|
||||
import { LightIconButton } from '@/ui/input/button/components/LightIconButton';
|
||||
import { useLazyLoadIcon } from '@/ui/input/hooks/useLazyLoadIcon';
|
||||
import { Card } from '@/ui/layout/card/components/Card';
|
||||
import { CardContent } from '@/ui/layout/card/components/CardContent';
|
||||
import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';
|
||||
@ -53,7 +53,8 @@ export const SettingsAboutSection = ({
|
||||
onEdit,
|
||||
}: SettingsAboutSectionProps) => {
|
||||
const theme = useTheme();
|
||||
const { Icon } = useLazyLoadIcon(iconKey);
|
||||
const { getIcon } = useIcons();
|
||||
const Icon = getIcon(iconKey);
|
||||
|
||||
const { closeDropdown } = useDropdown({ dropdownScopeId });
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import styled from '@emotion/styled';
|
||||
import { useRelationMetadata } from '@/object-metadata/hooks/useRelationMetadata';
|
||||
import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';
|
||||
import { getObjectSlug } from '@/object-metadata/utils/getObjectSlug';
|
||||
import { useLazyLoadIcon } from '@/ui/input/hooks/useLazyLoadIcon';
|
||||
import { useIcons } from '@/ui/display/icon/hooks/useIcons';
|
||||
import { TableCell } from '@/ui/layout/table/components/TableCell';
|
||||
import { TableRow } from '@/ui/layout/table/components/TableRow';
|
||||
|
||||
@ -39,7 +39,8 @@ export const SettingsObjectFieldItemTableRow = ({
|
||||
fieldMetadataItem: fieldMetadataItem,
|
||||
}: SettingsObjectFieldItemTableRowProps) => {
|
||||
const theme = useTheme();
|
||||
const { Icon } = useLazyLoadIcon(fieldMetadataItem.icon ?? '');
|
||||
const { getIcon } = useIcons();
|
||||
const Icon = getIcon(fieldMetadataItem.icon);
|
||||
const navigate = useNavigate();
|
||||
|
||||
// TODO: parse with zod and merge types with FieldType (create a subset of FieldType for example)
|
||||
|
||||
@ -4,8 +4,8 @@ import styled from '@emotion/styled';
|
||||
|
||||
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
|
||||
import { useFindManyRecords } from '@/object-record/hooks/useFindManyRecords';
|
||||
import { useIcons } from '@/ui/display/icon/hooks/useIcons';
|
||||
import { Tag } from '@/ui/display/tag/components/Tag';
|
||||
import { useLazyLoadIcon } from '@/ui/input/hooks/useLazyLoadIcon';
|
||||
import { TableCell } from '@/ui/layout/table/components/TableCell';
|
||||
import { TableRow } from '@/ui/layout/table/components/TableRow';
|
||||
|
||||
@ -40,7 +40,8 @@ export const SettingsObjectItemTableRow = ({
|
||||
objectNameSingular: objectItem.nameSingular,
|
||||
});
|
||||
|
||||
const { Icon } = useLazyLoadIcon(objectItem.icon ?? '');
|
||||
const { getIcon } = useIcons();
|
||||
const Icon = getIcon(objectItem.icon);
|
||||
|
||||
return (
|
||||
<StyledObjectTableRow key={objectItem.namePlural} onClick={onClick}>
|
||||
|
||||
Reference in New Issue
Block a user