mirror of
https://github.com/ansible/awx.git
synced 2024-10-30 13:55:31 +03:00
change name of hook to be useKebabifiedMenu
This commit is contained in:
parent
8f04026404
commit
a352de3da7
@ -10,10 +10,10 @@ import {
|
||||
} from '@patternfly/react-core';
|
||||
import { ToolbarAddButton } from '../PaginatedDataList';
|
||||
import { toTitleCase } from '../../util/strings';
|
||||
import { useKebabified } from '../../contexts/Kebabified';
|
||||
import { useKebabifiedMenu } from '../../contexts/Kebabified';
|
||||
|
||||
function AddDropDownButton({ dropdownItems, i18n }) {
|
||||
const { isKebabified } = useKebabified();
|
||||
const { isKebabified } = useKebabifiedMenu();
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const element = useRef(null);
|
||||
|
||||
|
@ -4,10 +4,10 @@ import { Link } from 'react-router-dom';
|
||||
import { Button, DropdownItem, Tooltip } from '@patternfly/react-core';
|
||||
import { withI18n } from '@lingui/react';
|
||||
import { t } from '@lingui/macro';
|
||||
import { useKebabified } from '../../contexts/Kebabified';
|
||||
import { useKebabifiedMenu } from '../../contexts/Kebabified';
|
||||
|
||||
function ToolbarAddButton({ linkTo, onClick, i18n, isDisabled }) {
|
||||
const { isKebabified } = useKebabified();
|
||||
const { isKebabified } = useKebabifiedMenu();
|
||||
|
||||
if (!linkTo && !onClick) {
|
||||
throw new Error(
|
||||
|
@ -5,4 +5,4 @@ export const KebabifiedContext = React.createContext({});
|
||||
|
||||
export const KebabifiedProvider = KebabifiedContext.Provider;
|
||||
export const Kebabified = KebabifiedContext.Consumer;
|
||||
export const useKebabified = () => useContext(KebabifiedContext);
|
||||
export const useKebabifiedMenu = () => useContext(KebabifiedContext);
|
||||
|
Loading…
Reference in New Issue
Block a user