removed mandatory return

This commit is contained in:
borean 2024-03-31 18:18:51 +02:00
parent bc9b01d85a
commit 60b4bf2fc2
2 changed files with 3 additions and 5 deletions

View file

@ -37,7 +37,7 @@ function CreateProject(props: { name: string; description: string }): boolean {
* Provides UI for adding a project to the system.
* @returns {JSX.Element} - Returns the component UI for adding a project
*/
function AddProject(): JSX.Element {
function AddProject() {
const [name, setName] = useState("");
const [description, setDescription] = useState("");
@ -45,6 +45,7 @@ function AddProject(): JSX.Element {
<div className="flex flex-col h-fit w-screen items-center justify-center">
<div className="border-4 border-black bg-white flex flex-col items-center justify-center h-fit w-fit rounded-3xl content-center pl-20 pr-20">
<form
id="form"
className="bg-white rounded px-8 pt-6 pb-8 mb-4 items-center justify-center flex flex-col w-fit h-fit"
onSubmit={(e) => {
e.preventDefault();
@ -78,9 +79,6 @@ function AddProject(): JSX.Element {
<div className="flex items-center justify-between">
<Button
text="Create"
onClick={(): void => {
return;
}}
type="submit"
/>
</div>

View file

@ -13,7 +13,7 @@ function Button({
type,
}: {
text: string;
onClick: () => void;
onClick?: () => void;
type: "submit" | "button" | "reset";
}): JSX.Element {
return (