mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19: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";
|
"use client";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { Title } from "../../../../../components/UI/Elements/Styles/Title";
|
import { Title } from "@components/UI/Elements/Styles/Title";
|
||||||
import Layout from "../../../../../components/UI/Layout";
|
import { getOrganizationContextInfo } from "@services/orgs";
|
||||||
import { getOrganizationContextInfo } from "../../../../../services/orgs";
|
import { getOrgCourses } from "@services/courses/courses";
|
||||||
import { getOrgCourses } from "../../../../../services/courses/courses";
|
import { createCollection } from "@services/collections";
|
||||||
import { createCollection } from "../../../../../services/collections";
|
|
||||||
|
|
||||||
function NewCollection(params : any) {
|
function NewCollection(params : any) {
|
||||||
const orgslug = params.params.orgslug;
|
const orgslug = params.params.orgslug;
|
||||||
|
|
@ -18,7 +17,6 @@ function NewCollection(params : any) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
async function getCourses() {
|
async function getCourses() {
|
||||||
|
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
const org = await getOrganizationContextInfo(orgslug);
|
const org = await getOrganizationContextInfo(orgslug);
|
||||||
setOrg(org);
|
setOrg(org);
|
||||||
|
|
|
||||||
|
|
@ -2,17 +2,17 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import { Header } from "../../../../../../components/UI/Header";
|
import { Header } from "@components/UI/Header";
|
||||||
import Layout from "../../../../../../components/UI/Layout";
|
import Layout from "@components/UI/Layout";
|
||||||
import { Title } from "../../../../../../components/UI/Elements/Styles/Title";
|
import { Title } from "@components/UI/Elements/Styles/Title";
|
||||||
import { DragDropContext, Droppable } from "react-beautiful-dnd";
|
import { DragDropContext, Droppable } from "react-beautiful-dnd";
|
||||||
import { initialData, initialData2 } from "../../../../../../components/Drags/data";
|
import { initialData, initialData2 } from "@components/Drags/data";
|
||||||
import Chapter from "../../../../../../components/Drags/Chapter";
|
import Chapter from "@components/Drags/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/Modals/CourseEdit/NewChapter";
|
import NewChapterModal from "@components/Modals/CourseEdit/NewChapter";
|
||||||
import NewLectureModal from "../../../../../../components/Modals/CourseEdit/NewLecture";
|
import NewLectureModal from "@components/Modals/CourseEdit/NewLecture";
|
||||||
import { createLecture, createFileLecture } from "../../../../../../services/courses/lectures";
|
import { createLecture, createFileLecture } from "@services/courses/lectures";
|
||||||
|
|
||||||
function CourseEdit(params: any) {
|
function CourseEdit(params: any) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,12 @@
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import React, { useMemo } from "react";
|
import React, { useMemo } from "react";
|
||||||
import Layout from "../../../../../../../components/UI/Layout";
|
import Layout from "@components/UI/Layout";
|
||||||
import { getLecture } from "../../../../../../../services/courses/lectures";
|
import { getLecture } from "@services/courses/lectures";
|
||||||
import { getBackendUrl } from "../../../../../../../services/config";
|
import { getBackendUrl } from "@services/config";
|
||||||
import Canva from "../../../../../../../components/LectureViews/DynamicCanva/DynamicCanva";
|
import Canva from "@components/LectureViews/DynamicCanva/DynamicCanva";
|
||||||
import styled from "styled-components";
|
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 VideoLecture from "@components/LectureViews/Video/Video";
|
||||||
import { Check } from "lucide-react";
|
import { Check } from "lucide-react";
|
||||||
import { maskLectureAsComplete } from "@services/courses/activity";
|
import { maskLectureAsComplete } from "@services/courses/activity";
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { closeActivity, createActivity } from "@services/courses/activity";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import { getAPIUrl, getBackendUrl } from "../../../../../services/config";
|
import { getAPIUrl, getBackendUrl } from "@services/config";
|
||||||
import useSWR, { mutate } from "swr";
|
import useSWR, { mutate } from "swr";
|
||||||
import { swrFetcher } from "@services/utils/requests";
|
import { swrFetcher } from "@services/utils/requests";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import "../../../styles/globals.css";
|
import "@styles/globals.css";
|
||||||
import { Menu } from "../../../components/UI/Elements/Menu";
|
import { Menu } from "@components/UI/Elements/Menu";
|
||||||
import AuthProvider from "../../../components/Security/AuthProvider";
|
import AuthProvider from "@components/Security/AuthProvider";
|
||||||
|
|
||||||
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { getAPIUrl } from "../config";
|
import { getAPIUrl } from "@services/config";
|
||||||
|
|
||||||
interface LoginAndGetTokenResponse {
|
interface LoginAndGetTokenResponse {
|
||||||
access_token: "string";
|
access_token: "string";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { initialData } from "../../components/Drags/data";
|
import { initialData } from "../../components/Drags/data";
|
||||||
import { getAPIUrl } from "../config";
|
import { getAPIUrl } from "@services/config";
|
||||||
|
|
||||||
export async function getCourseChaptersMetadata(course_id: any) {
|
export async function getCourseChaptersMetadata(course_id: any) {
|
||||||
const HeadersConfig = new Headers({ "Content-Type": "application/json" });
|
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
|
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) {
|
export async function createLecture(data: any, chapter_id: any) {
|
||||||
data.content = {};
|
data.content = {};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { getAPIUrl } from "../config";
|
import { getAPIUrl } from "@services/config";
|
||||||
|
|
||||||
export async function uploadNewImageFile(file: any, lecture_id: string) {
|
export async function uploadNewImageFile(file: any, lecture_id: string) {
|
||||||
const HeadersConfig = new Headers();
|
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) {
|
export async function uploadNewVideoFile(file: any, lecture_id: string) {
|
||||||
const HeadersConfig = new Headers();
|
const HeadersConfig = new Headers();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue