mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-18 20:09:25 +00:00
chore: imports refactor
This commit is contained in:
parent
a64d8eda3a
commit
db4f32aaf0
11 changed files with 28 additions and 30 deletions
|
|
@ -1,11 +1,10 @@
|
|||
"use client";
|
||||
import { useRouter } from "next/navigation";
|
||||
import React from "react";
|
||||
import { Title } from "../../../../../components/UI/Elements/Styles/Title";
|
||||
import Layout from "../../../../../components/UI/Layout";
|
||||
import { getOrganizationContextInfo } from "../../../../../services/orgs";
|
||||
import { getOrgCourses } from "../../../../../services/courses/courses";
|
||||
import { createCollection } from "../../../../../services/collections";
|
||||
import { Title } from "@components/UI/Elements/Styles/Title";
|
||||
import { getOrganizationContextInfo } from "@services/orgs";
|
||||
import { getOrgCourses } from "@services/courses/courses";
|
||||
import { createCollection } from "@services/collections";
|
||||
|
||||
function NewCollection(params : any) {
|
||||
const orgslug = params.params.orgslug;
|
||||
|
|
@ -18,7 +17,6 @@ function NewCollection(params : any) {
|
|||
const router = useRouter();
|
||||
|
||||
async function getCourses() {
|
||||
|
||||
setIsLoading(true);
|
||||
const org = await getOrganizationContextInfo(orgslug);
|
||||
setOrg(org);
|
||||
|
|
|
|||
|
|
@ -2,17 +2,17 @@
|
|||
import React from "react";
|
||||
import { useState, useEffect } from "react";
|
||||
import styled from "styled-components";
|
||||
import { Header } from "../../../../../../components/UI/Header";
|
||||
import Layout from "../../../../../../components/UI/Layout";
|
||||
import { Title } from "../../../../../../components/UI/Elements/Styles/Title";
|
||||
import { Header } from "@components/UI/Header";
|
||||
import Layout from "@components/UI/Layout";
|
||||
import { Title } from "@components/UI/Elements/Styles/Title";
|
||||
import { DragDropContext, Droppable } from "react-beautiful-dnd";
|
||||
import { initialData, initialData2 } from "../../../../../../components/Drags/data";
|
||||
import Chapter from "../../../../../../components/Drags/Chapter";
|
||||
import { createChapter, deleteChapter, getCourseChaptersMetadata, updateChaptersMetadata } from "../../../../../../services/courses/chapters";
|
||||
import { initialData, initialData2 } from "@components/Drags/data";
|
||||
import Chapter from "@components/Drags/Chapter";
|
||||
import { createChapter, deleteChapter, getCourseChaptersMetadata, updateChaptersMetadata } from "@services/courses/chapters";
|
||||
import { useRouter } from "next/navigation";
|
||||
import NewChapterModal from "../../../../../../components/Modals/CourseEdit/NewChapter";
|
||||
import NewLectureModal from "../../../../../../components/Modals/CourseEdit/NewLecture";
|
||||
import { createLecture, createFileLecture } from "../../../../../../services/courses/lectures";
|
||||
import NewChapterModal from "@components/Modals/CourseEdit/NewChapter";
|
||||
import NewLectureModal from "@components/Modals/CourseEdit/NewLecture";
|
||||
import { createLecture, createFileLecture } from "@services/courses/lectures";
|
||||
|
||||
function CourseEdit(params: any) {
|
||||
const router = useRouter();
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
import { useRouter } from "next/navigation";
|
||||
import Link from "next/link";
|
||||
import React, { useMemo } from "react";
|
||||
import Layout from "../../../../../../../components/UI/Layout";
|
||||
import { getLecture } from "../../../../../../../services/courses/lectures";
|
||||
import { getBackendUrl } from "../../../../../../../services/config";
|
||||
import Canva from "../../../../../../../components/LectureViews/DynamicCanva/DynamicCanva";
|
||||
import Layout from "@components/UI/Layout";
|
||||
import { getLecture } from "@services/courses/lectures";
|
||||
import { getBackendUrl } from "@services/config";
|
||||
import Canva from "@components/LectureViews/DynamicCanva/DynamicCanva";
|
||||
import styled from "styled-components";
|
||||
import { getCourse, getCourseMetadata } from "../../../../../../../services/courses/courses";
|
||||
import { getCourse } from "@services/courses/courses";
|
||||
import VideoLecture from "@components/LectureViews/Video/Video";
|
||||
import { Check } from "lucide-react";
|
||||
import { maskLectureAsComplete } from "@services/courses/activity";
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { closeActivity, createActivity } from "@services/courses/activity";
|
|||
import Link from "next/link";
|
||||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
import { getAPIUrl, getBackendUrl } from "../../../../../services/config";
|
||||
import { getAPIUrl, getBackendUrl } from "@services/config";
|
||||
import useSWR, { mutate } from "swr";
|
||||
import { swrFetcher } from "@services/utils/requests";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import "../../../styles/globals.css";
|
||||
import { Menu } from "../../../components/UI/Elements/Menu";
|
||||
import AuthProvider from "../../../components/Security/AuthProvider";
|
||||
import "@styles/globals.css";
|
||||
import { Menu } from "@components/UI/Elements/Menu";
|
||||
import AuthProvider from "@components/Security/AuthProvider";
|
||||
|
||||
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { getAPIUrl } from "../config";
|
||||
import { getAPIUrl } from "@services/config";
|
||||
|
||||
interface LoginAndGetTokenResponse {
|
||||
access_token: "string";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { initialData } from "../../components/Drags/data";
|
||||
import { getAPIUrl } from "../config";
|
||||
import { getAPIUrl } from "@services/config";
|
||||
|
||||
export async function getCourseChaptersMetadata(course_id: any) {
|
||||
const HeadersConfig = new Headers({ "Content-Type": "application/json" });
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { getAPIUrl } from "../config";
|
||||
import { getAPIUrl } from "@services/config";
|
||||
|
||||
/*
|
||||
This file includes only POST, PUT, DELETE requests
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { getAPIUrl } from "../config";
|
||||
import { getAPIUrl } from "@services/config";
|
||||
|
||||
export async function createLecture(data: any, chapter_id: any) {
|
||||
data.content = {};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { getAPIUrl } from "../config";
|
||||
import { getAPIUrl } from "@services/config";
|
||||
|
||||
export async function uploadNewImageFile(file: any, lecture_id: string) {
|
||||
const HeadersConfig = new Headers();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { getAPIUrl } from "../config";
|
||||
import { getAPIUrl } from "@services/config";
|
||||
|
||||
export async function uploadNewVideoFile(file: any, lecture_id: string) {
|
||||
const HeadersConfig = new Headers();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue