working typescript compiling and fixing linting issues

This commit is contained in:
erik-sn committed 2020-10-11 13:59:25 -04:00
1 parent b1babd88c2
commit 3273d192c9
49 files changed
+271 -110

No files matched your search

+4 -2
View File
@@ -1,6 +1,8 @@
import React, { useState } from "react";
import { ContextMenu } from "../components/ContextMenu";
type UseContextMenu = [any, any, () => JSX.Element, boolean];
export const MapStringOptions = (current, onClick) => (string) => {
return {
selected: current === string,
@@ -10,8 +12,8 @@ export const MapStringOptions = (current, onClick) => (string) => {
};
};
export const useContextMenu = (_options = []) => {
const [open, setOpen] = useState();
export const useContextMenu = (_options = []): UseContextMenu => {
const [open, setOpen] = useState(false);
const [options, setOptions] = useState(_options);
const onClose = () => setOpen(false);