1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-11 10:26:21 +00:00

Remove Console.log / Added Type for props

This commit is contained in:
Wolfie 2024-03-11 00:11:59 -04:00
parent 35991f2501
commit 20cc80ad42
No known key found for this signature in database
GPG key ID: DE384EE9BF2D909A

View file

@ -4,18 +4,17 @@
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
*/ */
import { ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalRoot, ModalSize } from "@utils/modal"; import { ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, ModalSize } from "@utils/modal";
import { Button, React, Text, TextInput } from "@webpack/common"; import { Button, React, Text, TextInput } from "@webpack/common";
import noteHandler from "plugins/holynotes/noteHandler"; import noteHandler from "plugins/holynotes/noteHandler";
export default props => { export default (props: ModalProps & { onClose: () => void }) => {
const [notebookName, setNotebookName] = React.useState(""); const [notebookName, setNotebookName] = React.useState("");
const handleCreateNotebook = React.useCallback(() => { const handleCreateNotebook = React.useCallback(() => {
if (notebookName !== "") noteHandler.newNoteBook(notebookName); if (notebookName !== "") noteHandler.newNoteBook(notebookName);
props.onClose(); props.onClose();
}, [notebookName]); }, [notebookName]);
console.log(props);
return ( return (
<div> <div>