Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

Commit

Permalink
refactor: filter
Browse files Browse the repository at this point in the history
  • Loading branch information
DieWerkself committed Feb 25, 2024
1 parent 73706f9 commit 6630676
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 15 deletions.
10 changes: 0 additions & 10 deletions src/shared/ui/FilterSpecialization/FilterSpecialization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import { useState } from 'react';

import { useGetSpecs, useGetSpecsGroups } from '~/entities/storage';

import { useApi } from '~/shared/hooks';

import { FilterSpecializationModal } from './FilterSpecializationModal';

interface FilterSpecializationProps {
Expand All @@ -30,17 +28,9 @@ export const FilterSpecialization = ({
doubleChecked,
}: FilterSpecializationProps) => {
const [specFilter, setSpecFilter] = useState(false);
const { storageApi } = useApi();
const [searchText, setSearchText] = useState('');

const { data: specGroup } = useGetSpecsGroups();
// const { data: specs } = useGetSpecs();

// const { data: specGroup, isFetching: specGroupLoading } = useQuery({
// queryKey: ['specGroups'],
// queryFn: () => storageApi.getSpecGroups(),
// staleTime: Infinity,
// });

const { data: specs } = useGetSpecs({
query_text: searchText,
Expand Down
1 change: 0 additions & 1 deletion src/shared/ui/FilterSpecialization/GroupItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export const GroupItem = ({
singleChecked,
doubleChecked,
}: GroupItemProps) => {
// const [specsCount, setSpecsCount] = useState(0);
const [_, setCheckboxChange] = useState(false);
const getCurrentSpecs = (id: string) => {
return allSpecs.filter(({ group_id }) => group_id === id);
Expand Down
1 change: 0 additions & 1 deletion src/shared/ui/FilterSpecialization/SpecItem.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Checkbox, Text, useToast } from '@chakra-ui/react';
import type { Dispatch, SetStateAction } from 'react';
import { useState } from 'react';

interface SpecItemProps {
id: string;
Expand Down
3 changes: 0 additions & 3 deletions src/shared/ui/FilterSpecialization/SpecsGroups.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { Skeleton, HStack } from '@chakra-ui/react';
import type { Dispatch, SetStateAction } from 'react';

import { useGetSpecs } from '~/entities/storage';

import { SpecItem } from './SpecItem';

interface SpecsGroupsProps {
Expand Down

0 comments on commit 6630676

Please sign in to comment.