mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
chore: typescript refactor
This commit is contained in:
parent
81aead7611
commit
054f07e0e9
6 changed files with 29 additions and 43 deletions
|
|
@ -5,7 +5,7 @@ import React, { useMemo } from "react";
|
||||||
import Layout from "../../../../../../../components/UI/Layout";
|
import Layout from "../../../../../../../components/UI/Layout";
|
||||||
import { getElement } from "../../../../../../../services/courses/elements";
|
import { getElement } from "../../../../../../../services/courses/elements";
|
||||||
import { getBackendUrl } from "../../../../../../../services/config";
|
import { getBackendUrl } from "../../../../../../../services/config";
|
||||||
import Canva from "../../../../../../../components/Canva/Canva";
|
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, getCourseMetadata } from "../../../../../../../services/courses/courses";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
"use client";
|
"use client";
|
||||||
import { useRouter, useSearchParams, useSelectedLayoutSegment } from "next/navigation";
|
import { Title } from "@components/UI/Elements/Styles/Title";
|
||||||
import Layout from "../../../components/UI/Layout";
|
|
||||||
import { Title } from "../../../components/UI/Elements/Styles/Title";
|
|
||||||
import { Header } from "../../../components/UI/Header";
|
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { usePathname } from "next/navigation";
|
import { usePathname } from "next/navigation";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,12 @@ import React from "react";
|
||||||
import { useEditor, EditorContent } from "@tiptap/react";
|
import { useEditor, EditorContent } from "@tiptap/react";
|
||||||
import StarterKit from "@tiptap/starter-kit";
|
import StarterKit from "@tiptap/starter-kit";
|
||||||
// Custom Extensions
|
// Custom Extensions
|
||||||
import InfoCallout from "../Editor/Extensions/Callout/Info/InfoCallout";
|
import InfoCallout from "@editor/Extensions/Callout/Info/InfoCallout";
|
||||||
import WarningCallout from "../Editor/Extensions/Callout/Warning/WarningCallout";
|
import WarningCallout from "@editor/Extensions/Callout/Warning/WarningCallout";
|
||||||
import ImageBlock from "../Editor/Extensions/Image/ImageBlock";
|
import ImageBlock from "@editor/Extensions/Image/ImageBlock";
|
||||||
import Youtube from "@tiptap/extension-youtube";
|
import Youtube from "@tiptap/extension-youtube";
|
||||||
import { EditorContentWrapper } from "../Editor/Editor";
|
import { EditorContentWrapper } from "@editor/Editor";
|
||||||
import VideoBlock from "../Editor/Extensions/Video/VideoBlock";
|
import VideoBlock from "@editor/Extensions/Video/VideoBlock";
|
||||||
import { styled } from "styled-components";
|
import { styled } from "styled-components";
|
||||||
|
|
||||||
interface Editor {
|
interface Editor {
|
||||||
9
front/components/LectureViews/Video/Video.tsx
Normal file
9
front/components/LectureViews/Video/Video.tsx
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
function Video() {
|
||||||
|
return (
|
||||||
|
<div>Video</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Video
|
||||||
|
|
@ -2,7 +2,6 @@ import React, { useState } from "react";
|
||||||
import { ArrowLeftIcon, Cross1Icon } from "@radix-ui/react-icons";
|
import { ArrowLeftIcon, Cross1Icon } from "@radix-ui/react-icons";
|
||||||
import Modal from "../Modal";
|
import Modal from "../Modal";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import dynamic from "next/dynamic";
|
|
||||||
import DynamicCanvaModal from "./NewElementModal/DynamicCanva";
|
import DynamicCanvaModal from "./NewElementModal/DynamicCanva";
|
||||||
import VideoModal from "./NewElementModal/Video";
|
import VideoModal from "./NewElementModal/Video";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,7 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": [
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
"dom",
|
|
||||||
"dom.iterable",
|
|
||||||
"esnext"
|
|
||||||
],
|
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
|
@ -22,32 +18,17 @@
|
||||||
{
|
{
|
||||||
"name": "next"
|
"name": "next"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"baseUrl": ".",
|
||||||
|
"paths": {
|
||||||
|
"@components/*": ["components/*"],
|
||||||
|
"@public/*": ["public/*"],
|
||||||
|
"@images/*": ["public/img/*"],
|
||||||
|
"@services/*": ["services/*"],
|
||||||
|
"@editor/*": ["components/Editor/*"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||||
"next-env.d.ts",
|
|
||||||
"**/*.ts",
|
"exclude": ["node_modules"]
|
||||||
"**/*.tsx",
|
|
||||||
".next/types/**/*.ts"
|
|
||||||
],
|
|
||||||
"paths": {
|
|
||||||
"@components/*": [
|
|
||||||
"components/*"
|
|
||||||
],
|
|
||||||
"@public/*": [
|
|
||||||
"public/*"
|
|
||||||
],
|
|
||||||
"@images/*": [
|
|
||||||
"public/img/*"
|
|
||||||
],
|
|
||||||
"@services/*": [
|
|
||||||
"services/*"
|
|
||||||
],
|
|
||||||
"@editor/*": [
|
|
||||||
"components/Editor/*"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"node_modules"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue