mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
working typescript compiling and fixing linting issues
This commit is contained in:
1 parent
b1babd88c2
commit
3273d192c9
49 files changed
+271
-110
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user