mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
chore: refactor modals
This commit is contained in:
parent
e9d127bf89
commit
7b3badc10a
7 changed files with 3 additions and 5 deletions
|
|
@ -9,12 +9,11 @@ import { initialData, initialData2 } from "@components/Pages/CourseEdit/Draggabl
|
||||||
import Chapter from "@components/Pages/CourseEdit/Draggables/Chapter";
|
import Chapter from "@components/Pages/CourseEdit/Draggables/Chapter";
|
||||||
import { createChapter, deleteChapter, getCourseChaptersMetadata, updateChaptersMetadata } from "@services/courses/chapters";
|
import { createChapter, deleteChapter, getCourseChaptersMetadata, updateChaptersMetadata } from "@services/courses/chapters";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import NewChapterModal from "@components/Pages/CourseEdit/NewChapter";
|
import NewChapterModal from "@components/Modals/Chapters/NewChapter";
|
||||||
import NewActivityModal from "@components/Pages/CourseEdit/NewActivity";
|
import NewActivityModal from "@components/Modals/Activities/Create/NewActivity";
|
||||||
import { createActivity, createFileActivity } from "@services/courses/activities";
|
import { createActivity, createFileActivity } from "@services/courses/activities";
|
||||||
import { getOrganizationContextInfo } from "@services/organizations/orgs";
|
import { getOrganizationContextInfo } from "@services/organizations/orgs";
|
||||||
import Modal from "@components/UI/Modal/Modal";
|
import Modal from "@components/UI/Modal/Modal";
|
||||||
import AuthProvider from "@components/Security/AuthProvider";
|
|
||||||
import { denyAccessToUser } from "@services/utils/react/middlewares/views";
|
import { denyAccessToUser } from "@services/utils/react/middlewares/views";
|
||||||
|
|
||||||
function CourseEdit(params: any) {
|
function CourseEdit(params: any) {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import useSWR, { mutate } from "swr";
|
||||||
import { swrFetcher } from "@services/utils/ts/requests";
|
import { swrFetcher } from "@services/utils/ts/requests";
|
||||||
import { Edit2, Trash } from "lucide-react";
|
import { Edit2, Trash } from "lucide-react";
|
||||||
import Modal from "@components/UI/Modal/Modal";
|
import Modal from "@components/UI/Modal/Modal";
|
||||||
import CreateCourseModal from "@components/Pages/CreateCourse/CreateCourse";
|
import CreateCourseModal from "@components/Modals/Course/Create/CreateCourse";
|
||||||
|
|
||||||
const CoursesIndexPage = (params: any) => {
|
const CoursesIndexPage = (params: any) => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ function NewChapterModal({ submitChapter, closeModal }: any) {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
||||||
<FormLayout onSubmit={handleSubmit}>
|
<FormLayout onSubmit={handleSubmit}>
|
||||||
<FormField name="chapter-name">
|
<FormField name="chapter-name">
|
||||||
<Flex css={{ alignItems: 'baseline', justifyContent: 'space-between' }}>
|
<Flex css={{ alignItems: 'baseline', justifyContent: 'space-between' }}>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue