chore: imports refactor

This commit is contained in:
swve 2023-01-24 23:01:53 +01:00
parent a64d8eda3a
commit db4f32aaf0
11 changed files with 28 additions and 30 deletions

View file

@ -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);

View file

@ -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();

View file

@ -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";

View file

@ -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";

View file

@ -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 (

View file

@ -1,4 +1,4 @@
import { getAPIUrl } from "../config";
import { getAPIUrl } from "@services/config";
interface LoginAndGetTokenResponse {
access_token: "string";

View file

@ -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" });

View file

@ -1,4 +1,4 @@
import { getAPIUrl } from "../config";
import { getAPIUrl } from "@services/config";
/*
This file includes only POST, PUT, DELETE requests

View file

@ -1,4 +1,4 @@
import { getAPIUrl } from "../config";
import { getAPIUrl } from "@services/config";
export async function createLecture(data: any, chapter_id: any) {
data.content = {};

View file

@ -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();

View file

@ -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();