All files / app/src/entities/warehouse/ui/warehouse-header-content warehouse-header-content.tsx

100% Statements 10/10
100% Branches 1/1
100% Functions 1/1
100% Lines 10/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 171x           1x 1x 1x 1x 1x 1x 1x 1x   1x  
import { FC } from 'react'
import { Button } from '@tmk/ui-kit'
import { useTranslate } from '@/shared/lib'
import { WAREHOUSE_PAGE } from '@/entities/warehouse'
import { PERMISSION_CREATE_WAREHOUSE, RoleProvider } from '@/features/rolevik'
 
export const WarehouseHeaderContent: FC = () => {
  const { t } = useTranslate(['accounting-object'])
  return (
    <RoleProvider availablePermissions={[PERMISSION_CREATE_WAREHOUSE]}>
      <Button href={`${WAREHOUSE_PAGE}/create`}>
        <h2>{t('Create_warehouse')}</h2>
      </Button>
    </RoleProvider>
  )
}