chore(hooks): 🔧 Update TypeScript hook files (8 total)
This commit is contained in:
parent
d7d83b3282
commit
720ffe7480
8 changed files with 10 additions and 10 deletions
|
|
@ -5,7 +5,7 @@ import type { FC, ReactNode } from 'react';
|
|||
|
||||
import styled from '@lilith/ui-styled-components';
|
||||
|
||||
import type { AttributeDefinition, EntityType } from '@/types';
|
||||
import type { AttributeDefinition, EntityType } from '../types';
|
||||
|
||||
import { useAttributeDefinitions } from '../hooks/useAttributeDefinitions';
|
||||
import { useAttributeCategories } from '../hooks/useMeta';
|
||||
|
|
@ -236,7 +236,7 @@ function renderFilterValueControl(
|
|||
value={filter.value as string ?? ''}
|
||||
onChange={e => handleChange(e.target.value)}
|
||||
>
|
||||
{def.enumValues?.map(val => (
|
||||
{def.enumValues?.map((val: string) => (
|
||||
<option key={val} value={val}>
|
||||
{formatEnumValue(val)}
|
||||
</option>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import type { FC } from 'react';
|
|||
import styled from '@lilith/ui-styled-components';
|
||||
|
||||
import type { AttributeFilterValue } from './AttributeFilter';
|
||||
import type { AttributeDefinition, EntityType } from '@/types';
|
||||
import type { AttributeDefinition, EntityType } from '../types';
|
||||
|
||||
import { useAttributeDefinitions } from '../hooks/useAttributeDefinitions';
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
import { useState } from 'react'
|
||||
import type { FC } from 'react'
|
||||
|
||||
import type { EntityType, MetaCategory } from '@/types'
|
||||
import type { EntityType, MetaCategory } from '../types'
|
||||
|
||||
import { useMetaCategorizedAttributes, META_CATEGORY_META } from '../hooks'
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ export const MetaCategoryNavigator = ({
|
|||
>
|
||||
<div className="category-list">
|
||||
{data.categories.map((category) => {
|
||||
const meta = META_CATEGORY_META[category.metaCategory]
|
||||
const meta = META_CATEGORY_META[category.metaCategory as keyof typeof META_CATEGORY_META]
|
||||
const isSelected = selectedCategories.includes(category.metaCategory)
|
||||
const isExpanded = expandedCategories.has(category.metaCategory)
|
||||
const hasAttributes = category.count > 0
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useQuery } from '@tanstack/react-query'
|
||||
|
||||
import type { EntityType, AttributeDefinition, AttributeDefinitionFilters } from '@/types'
|
||||
import type { EntityType, AttributeDefinition, AttributeDefinitionFilters } from '../types'
|
||||
|
||||
import { fetchAttributeDefinitions, fetchAttributeDefinitionByCode, fetchAttributeDefinitionById } from '../api'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useQuery } from '@tanstack/react-query'
|
||||
|
||||
import type { EntityType } from '@/types'
|
||||
import type { EntityType } from '../types'
|
||||
|
||||
import { fetchAttributeValues, fetchAttributeValue } from '../api'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useQuery } from '@tanstack/react-query'
|
||||
|
||||
import type { EntityType } from '@/types'
|
||||
import type { EntityType } from '../types'
|
||||
|
||||
import { fetchEntityTypes, fetchAttributeCategories } from '../api'
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import type {
|
|||
AttributeDefinitionFilters,
|
||||
MetaCategory,
|
||||
AttributePriority,
|
||||
} from '@/types'
|
||||
} from '../types'
|
||||
|
||||
import { fetchAttributeDefinitions } from '../api'
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import type {
|
|||
CreateAttributeDefinitionRequest,
|
||||
UpdateAttributeDefinitionRequest,
|
||||
AttributeValues,
|
||||
} from '@/types'
|
||||
} from '../types'
|
||||
|
||||
import {
|
||||
createAttributeDefinition,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue