Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
ciur committed Sep 4, 2024
1 parent a6eea18 commit db347aa
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions ui2/src/components/modals/NewFolder.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {ChangeEvent} from "react"
import {useState, useEffect} from "react"
import {TextInput, Loader, Group, Button, Modal} from "@mantine/core"
import axios, {AxiosResponse} from "axios"
import {useAddNewFolderMutation} from "@/features/nodes/apiSlice"

type CreateFolderType = {
Expand All @@ -17,30 +16,13 @@ type Args = {
onCancel: () => void
}

async function api_create_new_folder(
title: string,
parent_id: string,
signal: AbortSignal
): Promise<AxiosResponse> {
let data: CreateFolderType = {
title: title,
parent_id: parent_id,
ctype: "folder"
}

return axios.post("/api/nodes/", data, {
signal
})
}

export const NewFolderModal = ({
parent_id,
onSubmit,
onCancel,
opened
}: Args) => {
const [addNewFolder, {isLoading, isError, isSuccess}] =
useAddNewFolderMutation()
const [addNewFolder, {isLoading, isSuccess}] = useAddNewFolderMutation()
const [title, setTitle] = useState("")

const handleTitleChanged = (event: ChangeEvent<HTMLInputElement>) => {
Expand Down

0 comments on commit db347aa

Please sign in to comment.