Skip to content

Commit f2abc30

Browse files
committed
lint fix
1 parent cce503b commit f2abc30

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/components/ButtonWithDropdownMenu/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function ButtonWithDropdownMenuInner<IValueType>(props: ButtonWithDropdownMenuPr
7373
const areAllOptionsDisabled = options.every((option) => option.disabled);
7474
const innerStyleDropButton = StyleUtils.getDropDownButtonHeight(buttonSize);
7575
const isButtonSizeLarge = buttonSize === CONST.DROPDOWN_BUTTON_SIZE.LARGE;
76-
const nullCheckRef = (ref: RefObject<View | null>) => ref ?? null;
76+
const nullCheckRef = (refParam: RefObject<View | null>) => refParam ?? null;
7777

7878
useEffect(() => {
7979
if (!dropdownAnchor.current) {

src/pages/workspace/WorkspaceOverviewPage.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function WorkspaceOverviewPage({policyDraft, policy: policyProp, route}: Workspa
174174

175175
const {setIsDeletingPaidWorkspace, isLoadingBill}: {setIsDeletingPaidWorkspace: (value: boolean) => void; isLoadingBill: boolean | undefined} = usePayAndDowngrade(setIsDeleteModalOpen);
176176

177-
const dropdownMenuRef = useRef<any>(null);
177+
const dropdownMenuRef = useRef<{setIsMenuVisible: (visible: boolean) => void} | null>(null);
178178

179179
const confirmDeleteAndHideModal = useCallback(() => {
180180
if (!policy?.id || !policyName) {
@@ -190,9 +190,10 @@ function WorkspaceOverviewPage({policyDraft, policy: policyProp, route}: Workspa
190190
}, [policy?.id, policyName, shouldUseNarrowLayout]);
191191

192192
useEffect(() => {
193-
if (!isLoadingBill) {
194-
dropdownMenuRef.current.setIsMenuVisible(false);
193+
if (isLoadingBill) {
194+
return;
195195
}
196+
dropdownMenuRef.current?.setIsMenuVisible(false);
196197
}, [isLoadingBill]);
197198

198199
const onDeleteWorkspace = useCallback(() => {
@@ -223,7 +224,7 @@ function WorkspaceOverviewPage({policyDraft, policy: policyProp, route}: Workspa
223224
if (readOnly) {
224225
return null;
225226
}
226-
const secondaryActions: DropdownOption<string>[] = [];
227+
const secondaryActions: Array<DropdownOption<string>> = [];
227228
if (isPolicyAdmin) {
228229
secondaryActions.push({
229230
value: 'invite',

0 commit comments

Comments
 (0)