Updated courses model and fixed rich text editor tool bar drop down problem
This commit is contained in:
@@ -186,14 +186,7 @@ const AddAboutUs = ({ isOpen, onClose }: AddAboutUsProps) => {
|
||||
<NumberDecrementStepper />
|
||||
</NumberInputStepper>
|
||||
</NumberInput>
|
||||
{/* <Input
|
||||
id="index"
|
||||
{...register("index", {
|
||||
required: "index is required.",
|
||||
})}
|
||||
placeholder="Index"
|
||||
type="Number"
|
||||
/> */}
|
||||
|
||||
{errors.index && (
|
||||
<FormErrorMessage>{errors.index.message}</FormErrorMessage>
|
||||
)}
|
||||
@@ -202,15 +195,7 @@ const AddAboutUs = ({ isOpen, onClose }: AddAboutUsProps) => {
|
||||
<FormControl isInvalid={!!errors.image} isRequired>
|
||||
<FormLabel>{'Image Upload'}</FormLabel>
|
||||
|
||||
{/* <FileUpload
|
||||
accept={'image/*'}
|
||||
multiple={false}
|
||||
register={register('image', { validate: validateFiles })}
|
||||
>
|
||||
<Button >
|
||||
Upload
|
||||
</Button>
|
||||
</FileUpload> */}
|
||||
|
||||
<input type="file" {...register("image", {
|
||||
required: "index is required.",
|
||||
})} />
|
||||
|
@@ -3,7 +3,6 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
|
||||
import { RouterProvider, createRouter } from "@tanstack/react-router"
|
||||
import ReactDOM from "react-dom/client"
|
||||
import { routeTree } from "./routeTree.gen"
|
||||
|
||||
import { StrictMode } from "react"
|
||||
import { OpenAPI } from "./client"
|
||||
import theme from "./theme"
|
||||
@@ -23,11 +22,11 @@ declare module "@tanstack/react-router" {
|
||||
}
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root")!).render(
|
||||
<StrictMode>
|
||||
|
||||
<ChakraProvider theme={theme}>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<RouterProvider router={router} />
|
||||
</QueryClientProvider>
|
||||
</ChakraProvider>
|
||||
</StrictMode>,
|
||||
|
||||
)
|
||||
|
@@ -36,7 +36,7 @@ export const Route = createFileRoute("/_layout/Courses/AddCourse")({
|
||||
function AddCourseForms() {
|
||||
|
||||
const toolbar = {
|
||||
options: ['inline', 'blockType', 'fontSize', 'list', 'textAlign', 'history', 'embedded', 'emoji', 'image'],
|
||||
options: ['inline', 'blockType', 'fontSize', 'list', 'textAlign', 'history', 'embedded', 'emoji',],
|
||||
inline: { inDropdown: true },
|
||||
list: { inDropdown: true },
|
||||
textAlign: { inDropdown: true },
|
||||
@@ -137,8 +137,8 @@ function AddCourseForms() {
|
||||
setLongDescriptionEditorState(newState);
|
||||
setlongDescription(draftToHtml(convertToRaw(newState.getCurrentContent())));
|
||||
setValue("long_description", longDescription);
|
||||
|
||||
}}
|
||||
|
||||
toolbar={toolbar}
|
||||
/>
|
||||
</FormControl>
|
||||
|
Reference in New Issue
Block a user