Skip to content

Commit

Permalink
Change openAllMaterials to onClickAllMaterials
Browse files Browse the repository at this point in the history
  • Loading branch information
qtuan1401 committed Jan 2, 2021
1 parent 2276947 commit 154d7aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/app/common-ui/DropdownButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import styles from './style.scss';

export function DropDownButton({
className,
openAllMaterials,
onClickAllMaterials,
children,
dropList = [],
type,
Expand All @@ -25,7 +25,7 @@ export function DropDownButton({
className={cx(styles.dropdownButton, isPrimary && styles.primaryDropdownButton)}
type="button"
{...otherProps}
onClick={openAllMaterials}
onClick={onClickAllMaterials}
>
{children}
</button>
Expand Down Expand Up @@ -69,7 +69,7 @@ DropDownButton.propTypes = {
type: PropTypes.string,
children: PropTypes.node,
dropList: PropTypes.any,
openAllMaterials: PropTypes.any,
onClickAllMaterials: PropTypes.any,
};

export function PrimaryDropDownButton(props) {
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/ContestActionButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ function MaterialButton({ materials, type, buttonWidth }) {
{type === 'primary' ? (
<PrimaryDropDownButton
dropList={dropList}
openAllMaterials={() => openLink(materials.all_materials_url)}
onClickAllMaterials={() => openLink(materials.all_materials_url)}
>
Xem tư liệu kỳ thi
</PrimaryDropDownButton>
) : (
<DropDownButton
dropList={dropList}
openAllMaterials={() => openLink(materials.all_materials_url)}
onClickAllMaterials={() => openLink(materials.all_materials_url)}
>
Xem tư liệu kỳ thi
</DropDownButton>
Expand Down

0 comments on commit 154d7aa

Please sign in to comment.