Skip to content

Commit

Permalink
feat(faq): types
Browse files Browse the repository at this point in the history
  • Loading branch information
mydearxym committed Aug 4, 2023
1 parent f1a7636 commit 05b454e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/containers/thread/DashboardThread/CMS/Docs/FAQ/Block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ import {
import { deleteFAQSection } from '../../../logic'
import { triggerEditFAQ, moveUpFAQ, moveDownFAQ } from '../../../logic/faq'

import type { TProps as TIndex } from '.'

type TProps = {
section: TFAQSection
editingFAQIndex: number | null
editingFAQ: TFAQSection
isFirst: boolean
isLast: boolean
sortOnly: boolean
}
} & Pick<TIndex, 'editingFAQIndex' | 'editingFAQ'>

const Block: FC<TProps> = ({ section, editingFAQIndex, editingFAQ, isFirst, isLast, sortOnly }) => {
if (editingFAQIndex === section.index) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Block from './Block'

import { Wrapper, InnerWrapper, ItemsWrapper } from '../../../styles/cms/docs/faq'

type TProps = {
export type TProps = {
sections: TFAQSection[]
editingFAQIndex: number | null
editingFAQ: TFAQSection
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/FaqList/Collapse/Section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Wrapper, Header, Title, ArrowIcon, Body } from '../styles/collapse/sect
type TProps = {
item: TFAQSection
openedIndexes: number[]
toggle: (id: number) => void
toggle: (index: number) => void
}

const Section: FC<TProps> = ({ item, openedIndexes, toggle }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/FaqList/Collapse/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FC, memo, useState, useCallback, useEffect } from 'react'
import { isEmpty, includes, reject, pluck } from 'ramda'

import type { TID, TMenuOption } from '@/spec'
import type { TMenuOption } from '@/spec'

import { MENU, DEFAULT_MENU } from './constant'

Expand Down

0 comments on commit 05b454e

Please sign in to comment.