refactor: more TS code
This commit is contained in:
@@ -36,7 +36,6 @@ const StyledPicker = styled.div`
|
||||
`;
|
||||
|
||||
export default function ReactionPicker({ mid, hidePicker }) {
|
||||
// const wrapperRef = useRef(null);
|
||||
const [reactMessage, { isLoading }] = useReactMessageMutation();
|
||||
const { reactionData, currUid } = useAppSelector((store) => {
|
||||
return {
|
||||
@@ -44,8 +43,7 @@ export default function ReactionPicker({ mid, hidePicker }) {
|
||||
currUid: store.authData.user?.uid
|
||||
};
|
||||
});
|
||||
// useOutsideClick(wrapperRef, hidePicker);
|
||||
const handleReact = (emoji) => {
|
||||
const handleReact = (emoji: string) => {
|
||||
console.log("react", emoji);
|
||||
reactMessage({ mid, action: emoji });
|
||||
hidePicker();
|
||||
|
||||
@@ -100,7 +100,7 @@ interface Props {
|
||||
closeModal: () => void;
|
||||
title?: string;
|
||||
navs: Nav[];
|
||||
dangers: Danger[];
|
||||
dangers: [Danger | boolean];
|
||||
nav: { title: string; name?: string; component?: ReactNode };
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user