s
Size: a a a
s
c
type TabsType<Keys extends string> = {если еще актуально)
[K in Keys]: {
title: string | Store<string>,
fn: (_: { changeTab:Event<Keys> }) => void,
}
}
function Tabs<Keys extends string>(tabs:TabsType<Keys>) {
}
yarn
yarn start
s
s
yarn
yarn start
type TabConfig<T> = {
title: string | Store<string>;
fn: (_: { changeTab: Event<T> }) => void;
}
type TabsConfig<Keys extends string> = Record<Keys, TabConfig<Keys>>
...
for (const [key, tab] of Object.entries<TabConfig<Keys>>(tabs))
s
s
c
type TabConfig<T> = {
title: string | Store<string>;
fn: (_: { changeTab: Event<T> }) => void;
}
type TabsConfig<Keys extends string> = Record<Keys, TabConfig<Keys>>
...
for (const [key, tab] of Object.entries<TabConfig<Keys>>(tabs))
s
c
🚀🚀
🚀🚀
ф
BB
BB
AO
AO
ф
BB
ЕГ
NT
split({
source: fetchClientFx.doneData.map(({ entityId }) => entityId),
match: {
bank: ({ type }) => type === AccountType.Bank,
company: ({ type }) => type === AccountType.Company,
individual: ({ type }) => type === AccountType.Individual,
},
cases: {
bank: fetchBankFx,
company: fetchCompanyFx,
individual: fetchIndividualFx,
},
})