mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
Merge pull request #30 from learnhouse/feat/app-directory
This commit is contained in:
commit
0595495dd5
28 changed files with 418 additions and 295 deletions
15
app.py
15
app.py
|
|
@ -9,12 +9,12 @@ from src.services.mocks.initial import create_initial_data
|
|||
|
||||
########################
|
||||
# Pre-Alpha Version 0.1.0
|
||||
# Author: @swve
|
||||
# (c) LearnHouse 2022
|
||||
# Author: @swve
|
||||
# (c) LearnHouse 2022
|
||||
########################
|
||||
|
||||
|
||||
# Global Config
|
||||
# Global Config
|
||||
app = FastAPI(
|
||||
title="LearnHouse",
|
||||
description="LearnHouse is a new open-source platform tailored for learning experiences.",
|
||||
|
|
@ -33,21 +33,26 @@ app.add_middleware(
|
|||
app.mount("/content", StaticFiles(directory="content"), name="content")
|
||||
|
||||
# Exception Handler
|
||||
|
||||
|
||||
@app.exception_handler(AuthJWTException)
|
||||
def authjwt_exception_handler(request: Request, exc: AuthJWTException):
|
||||
return JSONResponse(
|
||||
status_code=exc.status_code, # type: ignore
|
||||
content={"detail": exc.message} # type: ignore
|
||||
content={"detail": exc.message} # type: ignore
|
||||
)
|
||||
|
||||
|
||||
app.include_router(global_router)
|
||||
|
||||
|
||||
@app.get("/")
|
||||
async def root():
|
||||
return {"Message": "Welcome to LearnHouse ✨"}
|
||||
|
||||
|
||||
@app.get("/initial_data")
|
||||
async def initial_data():
|
||||
|
||||
|
||||
await create_initial_data()
|
||||
return {"Message": "Initial data created 🤖"}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { useRouter } from "next/router";
|
||||
"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";
|
||||
|
|
@ -6,17 +7,18 @@ import { getOrganizationContextInfo } from "../../../../../services/orgs";
|
|||
import { getOrgCourses } from "../../../../../services/courses/courses";
|
||||
import { createCollection } from "../../../../../services/collections";
|
||||
|
||||
function NewCollection() {
|
||||
const router = useRouter();
|
||||
const { orgslug } = router.query;
|
||||
function NewCollection(params : any) {
|
||||
const orgslug = params.params.orgslug;
|
||||
const [name, setName] = React.useState("");
|
||||
const [org, setOrg] = React.useState({}) as any;
|
||||
const [description, setDescription] = React.useState("");
|
||||
const [selectedCourses, setSelectedCourses] = React.useState([]) as any;
|
||||
const [courses, setCourses] = React.useState([]) as any;
|
||||
const [isLoading, setIsLoading] = React.useState(false);
|
||||
const router = useRouter();
|
||||
|
||||
async function getCourses() {
|
||||
|
||||
setIsLoading(true);
|
||||
const org = await getOrganizationContextInfo(orgslug);
|
||||
setOrg(org);
|
||||
|
|
@ -47,12 +49,12 @@ function NewCollection() {
|
|||
};
|
||||
|
||||
React.useEffect(() => {
|
||||
if (router.isReady) {
|
||||
if (params.params.orgslug) {
|
||||
getCourses();
|
||||
}
|
||||
return () => {};
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [router.isReady]);
|
||||
}, [params.params.orgslug]);
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
"use client";
|
||||
import Layout from "../../../../components/UI/Layout";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
|
|
@ -8,9 +9,8 @@ import { deleteCollection, getOrgCollections } from "../../../../services/collec
|
|||
import { getOrganizationContextInfo } from "../../../../services/orgs";
|
||||
import { getBackendUrl } from "../../../../services/config";
|
||||
|
||||
function Collections() {
|
||||
const router = useRouter();
|
||||
const { orgslug } = router.query;
|
||||
function Collections(params:any) {
|
||||
const orgslug = params.params.orgslug;
|
||||
|
||||
const [isLoading, setIsLoading] = React.useState(true);
|
||||
const [collections, setCollections] = React.useState([]);
|
||||
|
|
@ -38,7 +38,7 @@ function Collections() {
|
|||
<Layout>
|
||||
<Title>
|
||||
{orgslug} Collections :{" "}
|
||||
<Link href={"/org/" + orgslug + "/collections/new"}>
|
||||
<Link href={"/collections/new"}>
|
||||
<button>+</button>
|
||||
</Link>{" "}
|
||||
</Title>
|
||||
|
|
@ -1,19 +1,20 @@
|
|||
"use client";
|
||||
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 { useRouter } from "next/router";
|
||||
import { useRouter } from "next/navigation";
|
||||
import NewChapterModal from "../../../../../../components/Modals/CourseEdit/NewChapter";
|
||||
import NewElementModal from "../../../../../../components/Modals/CourseEdit/NewElement";
|
||||
import { createElement, createFileElement } from "../../../../../../services/courses/elements";
|
||||
|
||||
function CourseEdit() {
|
||||
function CourseEdit(params: any) {
|
||||
const router = useRouter();
|
||||
|
||||
// Initial Course State
|
||||
|
|
@ -27,7 +28,8 @@ function CourseEdit() {
|
|||
|
||||
// Check window availability
|
||||
const [winReady, setwinReady] = useState(false);
|
||||
const { courseid, orgslug } = router.query;
|
||||
const courseid = params.params.courseid;
|
||||
const orgslug = params.params.orgslug;
|
||||
|
||||
async function getCourseChapters() {
|
||||
const courseChapters = await getCourseChaptersMetadata(courseid);
|
||||
|
|
@ -36,12 +38,12 @@ function CourseEdit() {
|
|||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (router.isReady) {
|
||||
if (courseid && orgslug) {
|
||||
getCourseChapters();
|
||||
}
|
||||
|
||||
setwinReady(true);
|
||||
}, [router.isReady]);
|
||||
}, [courseid, orgslug]);
|
||||
|
||||
// get a list of chapters order by chapter order
|
||||
const getChapters = () => {
|
||||
|
|
@ -1,22 +1,24 @@
|
|||
"use client";
|
||||
import { default as React, useEffect, useRef } from "react";
|
||||
|
||||
import Layout from "../../../../../../../components//UI/Layout";
|
||||
import { Title } from "../../../../../../../components//UI/Elements/Styles/Title";
|
||||
import Layout from "../../../../../../../../components/UI/Layout";
|
||||
import { Title } from "../../../../../../../../components/UI/Elements/Styles/Title";
|
||||
import dynamic from "next/dynamic";
|
||||
import { useRouter } from "next/router";
|
||||
import { getElement } from "../../../../../../../services/courses/elements";
|
||||
import AuthProvider from "../../../../../../../components/Security/AuthProvider";
|
||||
import EditorWrapper from "../../../../../../../components/Editor/EditorWrapper";
|
||||
import { getCourseMetadata } from "../../../../../../../services/courses/courses";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { getElement } from "../../../../../../../../services/courses/elements";
|
||||
import AuthProvider from "../../../../../../../../components/Security/AuthProvider";
|
||||
import EditorWrapper from "../../../../../../../../components/Editor/EditorWrapper";
|
||||
import { getCourseMetadata } from "../../../../../../../../services/courses/courses";
|
||||
|
||||
// Workaround (Next.js SSR doesn't support tip tap editor)
|
||||
const Editor: any = dynamic(() => import("../../../../../../../components/Editor/EditorWrapper") as any, {
|
||||
const Editor: any = dynamic(() => import("../../../../../../../../components/Editor/EditorWrapper") as any, {
|
||||
ssr: false,
|
||||
});
|
||||
|
||||
function EditElement() {
|
||||
function EditElement(params: any) {
|
||||
const router = useRouter();
|
||||
const { elementid, courseid } = router.query;
|
||||
const elementid = params.params.elementid;
|
||||
const courseid = params.params.courseid;
|
||||
const [element, setElement] = React.useState<any>({});
|
||||
const [courseInfo, setCourseInfo] = React.useState({}) as any;
|
||||
const [isLoading, setIsLoading] = React.useState(true);
|
||||
|
|
@ -38,12 +40,12 @@ function EditElement() {
|
|||
}
|
||||
|
||||
React.useEffect(() => {
|
||||
if (router.isReady) {
|
||||
if (elementid && courseid) {
|
||||
fetchAllData();
|
||||
}
|
||||
return () => {};
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [router.isReady]);
|
||||
}, [elementid, courseid ]);
|
||||
|
||||
return (
|
||||
<AuthProvider>
|
||||
|
|
@ -1,13 +1,14 @@
|
|||
import { useRouter } from "next/router";
|
||||
"use client";
|
||||
import { useRouter } from "next/navigation";
|
||||
import React, { useMemo } from "react";
|
||||
import Layout from "../../../../../../../components//UI/Layout";
|
||||
import Layout from "../../../../../../../components/UI/Layout";
|
||||
import { getElement } from "../../../../../../../services/courses/elements";
|
||||
import { getBackendUrl } from "../../../../../../../services/config";
|
||||
import Canva from "../../../../../../../components/Canva/Canva";
|
||||
|
||||
function ElementPage() {
|
||||
function ElementPage(params: any) {
|
||||
const router = useRouter();
|
||||
const { elementid } = router.query;
|
||||
const elementid = params.params.elementid;
|
||||
const [element, setElement] = React.useState<any>({});
|
||||
const [isLoading, setIsLoading] = React.useState(true);
|
||||
|
||||
|
|
@ -18,12 +19,12 @@ function ElementPage() {
|
|||
}
|
||||
|
||||
React.useEffect(() => {
|
||||
if (router.isReady) {
|
||||
if (elementid) {
|
||||
fetchElementData();
|
||||
}
|
||||
return () => {};
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [router.isReady]);
|
||||
}, [elementid]);
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
|
|
@ -1,15 +1,17 @@
|
|||
"use client";
|
||||
import { EyeOpenIcon, Pencil2Icon } from "@radix-ui/react-icons";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import { useRouter } from "next/navigation";
|
||||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
import Layout from "../../../../../components//UI/Layout";
|
||||
import Layout from "../../../../../components/UI/Layout";
|
||||
import { getAPIUrl, getBackendUrl } from "../../../../../services/config";
|
||||
import { getCourse, getCourseMetadata } from "../../../../../services/courses/courses";
|
||||
|
||||
const CourseIdPage = () => {
|
||||
const CourseIdPage = (params : any) => {
|
||||
const router = useRouter();
|
||||
const { courseid, orgslug } = router.query;
|
||||
const courseid = params.params.courseid;
|
||||
const orgslug = params.params.orgslug;
|
||||
|
||||
const [isLoading, setIsLoading] = React.useState(true);
|
||||
const [courseInfo, setCourseInfo] = React.useState({}) as any;
|
||||
|
|
@ -24,12 +26,12 @@ const CourseIdPage = () => {
|
|||
}
|
||||
|
||||
React.useEffect(() => {
|
||||
if (router.isReady) {
|
||||
if (courseid && orgslug) {
|
||||
fetchCourseInfo();
|
||||
}
|
||||
return () => {};
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [router.isReady]);
|
||||
}, [courseid && orgslug]);
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
import { useRouter } from "next/router";
|
||||
import { useRouter } from "next/navigation";
|
||||
import React from "react";
|
||||
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 { createNewCourse } from "../../../../../services/courses/courses";
|
||||
import { getOrganizationContextInfo } from "../../../../../services/orgs";
|
||||
|
||||
const NewCoursePage = () => {
|
||||
const NewCoursePage = (params: any) => {
|
||||
const router = useRouter();
|
||||
const { orgslug } = router.query;
|
||||
const orgslug = params.params.orgslug;
|
||||
const [name, setName] = React.useState("");
|
||||
const [description, setDescription] = React.useState("");
|
||||
const [isLoading, setIsLoading] = React.useState(false);
|
||||
|
|
@ -48,10 +48,10 @@ const NewCoursePage = () => {
|
|||
};
|
||||
|
||||
React.useEffect(() => {
|
||||
if (router.isReady) {
|
||||
if (orgslug) {
|
||||
getOrgMetadata();
|
||||
}
|
||||
}, [isLoading, router.isReady]);
|
||||
}, [isLoading, orgslug]);
|
||||
|
||||
|
||||
return (
|
||||
|
|
@ -1,17 +1,18 @@
|
|||
"use client";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import { useRouter } from "next/navigation";
|
||||
import React 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 { getBackendUrl } from "../../../../services/config";
|
||||
import { deleteCourseFromBackend, getOrgCourses } from "../../../../services/courses/courses";
|
||||
import { getOrganizationContextInfo } from "../../../../services/orgs";
|
||||
|
||||
const CoursesIndexPage = () => {
|
||||
const CoursesIndexPage = (params : any) => {
|
||||
const router = useRouter();
|
||||
const { orgslug } = router.query;
|
||||
const orgslug = params.params.orgslug;
|
||||
|
||||
const [isLoading, setIsLoading] = React.useState(true);
|
||||
const [orgInfo, setOrgInfo] = React.useState(null);
|
||||
|
|
@ -36,20 +37,20 @@ const CoursesIndexPage = () => {
|
|||
}
|
||||
|
||||
React.useEffect(() => {
|
||||
if (router.isReady) {
|
||||
if (orgslug) {
|
||||
fetchCourses();
|
||||
if (courses.length > 0) {
|
||||
setIsLoading(false);
|
||||
}
|
||||
}
|
||||
}, [isLoading, router.isReady]);
|
||||
}, [isLoading, orgslug]);
|
||||
|
||||
return (
|
||||
<Layout title="Courses">
|
||||
<Header></Header>
|
||||
<Title>
|
||||
{orgslug} Courses :{" "}
|
||||
<Link href={"/org/" + orgslug + "/courses/new"}>
|
||||
<Link href={"/courses/new"}>
|
||||
|
||||
<button>+</button>
|
||||
|
||||
26
front/app/_orgs/[orgslug]/page.tsx
Normal file
26
front/app/_orgs/[orgslug]/page.tsx
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
"use client";
|
||||
import { useRouter, useSearchParams, useSelectedLayoutSegment } from "next/navigation";
|
||||
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 { usePathname } from 'next/navigation';
|
||||
|
||||
const OrgHomePage = (params: any) => {
|
||||
const orgslug = params.params.orgslug;
|
||||
const pathname = usePathname();
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Layout orgslug={orgslug} title={"Org " + orgslug}>
|
||||
<Header></Header>
|
||||
<Title>Welcome {orgslug} 👋🏻</Title>
|
||||
<Link href={pathname + "/courses"}>
|
||||
<button>See Courses </button>
|
||||
</Link>
|
||||
</Layout>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default OrgHomePage;
|
||||
9
front/app/head.tsx
Normal file
9
front/app/head.tsx
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
export default function Head() {
|
||||
return (
|
||||
<>
|
||||
<title>LearnHouse</title>
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</>
|
||||
)
|
||||
}
|
||||
15
front/app/layout.tsx
Normal file
15
front/app/layout.tsx
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import '../styles/globals.css'
|
||||
import StyledComponentsRegistry from '../services/lib/styled-registry'
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
return (
|
||||
<html>
|
||||
<head />
|
||||
<body> <StyledComponentsRegistry>{children}</StyledComponentsRegistry></body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
|
|
@ -1,13 +1,15 @@
|
|||
import Router from "next/router";
|
||||
"use client";
|
||||
import { useRouter } from 'next/navigation';
|
||||
import React from "react";
|
||||
import { Header } from "../components//UI/Header";
|
||||
import Layout from "../components//UI/Layout";
|
||||
import { Title } from "../components//UI/Elements/Styles/Title";
|
||||
import { loginAndGetToken } from "../services/auth/auth";
|
||||
import { Header } from "../../components/UI/Header";
|
||||
import Layout from "../../components/UI/Layout";
|
||||
import { Title } from "../../components/UI/Elements/Styles/Title";
|
||||
import { loginAndGetToken } from "../../services/auth/auth";
|
||||
|
||||
const Login = () => {
|
||||
const [email, setEmail] = React.useState("");
|
||||
const [password, setPassword] = React.useState("");
|
||||
const router = useRouter();
|
||||
|
||||
const handleSubmit = (e: any) => {
|
||||
e.preventDefault();
|
||||
|
|
@ -15,7 +17,7 @@ const Login = () => {
|
|||
alert(JSON.stringify({ email, password }));
|
||||
try {
|
||||
loginAndGetToken(email, password);
|
||||
Router.push("/");
|
||||
router.push("/");
|
||||
}
|
||||
catch (e) {
|
||||
console.log(e);
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import Layout from "../../components//UI/Layout";
|
||||
import { Title } from "../../components//UI/Elements/Styles/Title";
|
||||
import Layout from "../../components/UI/Layout";
|
||||
import { Title } from "../../components/UI/Elements/Styles/Title";
|
||||
import { createNewOrganization } from "../../services/orgs";
|
||||
|
||||
const Organizations = () => {
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
"use client"; //todo: use server components
|
||||
import Link from "next/link";
|
||||
import React from "react";
|
||||
import Layout from "../../components//UI/Layout";
|
||||
import { Title } from "../../components//UI/Elements/Styles/Title";
|
||||
import Layout from "../../components/UI/Layout";
|
||||
import { Title } from "../../components/UI/Elements/Styles/Title";
|
||||
import { deleteOrganizationFromBackend, getUserOrganizations } from "../../services/orgs";
|
||||
|
||||
const Organizations = () => {
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
"use client";
|
||||
import type { NextPage } from "next";
|
||||
import { motion } from "framer-motion";
|
||||
import styled from "styled-components";
|
||||
|
|
@ -38,15 +39,12 @@ const Home: NextPage = () => {
|
|||
>
|
||||
<div>
|
||||
<Link href={"/organizations"}>
|
||||
|
||||
<OrgsButton>See Organizations</OrgsButton>
|
||||
|
||||
</Link>
|
||||
<br /><br />
|
||||
<br />
|
||||
<br />
|
||||
<Link href={"/login"}>
|
||||
|
||||
<OrgsButton>Login</OrgsButton>
|
||||
|
||||
</Link>
|
||||
</div>
|
||||
</motion.div>
|
||||
|
|
@ -56,21 +54,21 @@ const Home: NextPage = () => {
|
|||
|
||||
const OrgsButton = styled.button`
|
||||
background: #151515;
|
||||
border: 1px solid #e5e5e50a;
|
||||
box-sizing: border-box;
|
||||
border-radius: 4px;
|
||||
padding: 10px 20px;
|
||||
color: white;
|
||||
font-size: 16px;
|
||||
line-height: 24px;
|
||||
margin: 0 10px;
|
||||
margin: auto;
|
||||
cursor: pointer;
|
||||
font-family: "DM Sans";
|
||||
font-weight: 500;
|
||||
border-radius: 12px;
|
||||
-webkit-transition: all 0.2s ease-in-out;
|
||||
transition: all 0.2s ease-in-out;
|
||||
border: 1px solid #e5e5e50a;
|
||||
box-sizing: border-box;
|
||||
border-radius: 4px;
|
||||
padding: 10px 20px;
|
||||
color: white;
|
||||
font-size: 16px;
|
||||
line-height: 24px;
|
||||
margin: 0 10px;
|
||||
margin: auto;
|
||||
cursor: pointer;
|
||||
font-family: "DM Sans";
|
||||
font-weight: 500;
|
||||
border-radius: 12px;
|
||||
-webkit-transition: all 0.2s ease-in-out;
|
||||
transition: all 0.2s ease-in-out;
|
||||
&:hover {
|
||||
background: #191919;
|
||||
}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
import React from "react";
|
||||
import { Header } from "../components//UI/Header";
|
||||
import Layout from "../components//UI/Layout";
|
||||
import { Title } from "../components//UI/Elements/Styles/Title";
|
||||
import { signup } from "../services/auth/auth";
|
||||
import { Header } from "../../components/UI/Header";
|
||||
import Layout from "../../components/UI/Layout";
|
||||
import { Title } from "../../components/UI/Elements/Styles/Title";
|
||||
import { signup } from "../../services/auth/auth";
|
||||
|
||||
const SignUp = () => {
|
||||
const [email, setEmail] = React.useState("");
|
||||
|
|
@ -10,7 +10,7 @@ interface EditorWrapperProps {
|
|||
course:any
|
||||
}
|
||||
|
||||
function EditorWrapper(props: EditorWrapperProps) {
|
||||
function EditorWrapper(props: EditorWrapperProps) : JSX.Element {
|
||||
// A new Y document
|
||||
const ydoc = new Y.Doc();
|
||||
const [providerState, setProviderState] = React.useState<any>({});
|
||||
|
|
@ -33,6 +33,7 @@ function EditorWrapper(props: EditorWrapperProps) {
|
|||
|
||||
if (isLoading) {
|
||||
createRTCProvider();
|
||||
return <div>Loading...</div>;
|
||||
} else {
|
||||
return <Editor course={props.course} element={props.element} content={props.content} setContent={setContent} provider={providerState} ydoc={ydocState}></Editor>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"use client";
|
||||
import React, { useEffect } from "react";
|
||||
import { getRefreshToken, getUserInfo } from "../../services/auth/auth";
|
||||
import { useRouter } from "next/router";
|
||||
import { useRouter, usePathname } from "next/navigation";
|
||||
|
||||
export const AuthContext: any = React.createContext({});
|
||||
|
||||
|
|
@ -12,7 +13,7 @@ export interface Auth {
|
|||
isLoading: boolean;
|
||||
}
|
||||
|
||||
const AuthProvider = (props: any) => {
|
||||
const AuthProvider = ({ children }: any) => {
|
||||
const router = useRouter();
|
||||
const [auth, setAuth] = React.useState<Auth>({ access_token: "", isAuthenticated: false, userInfo: {}, isLoading: true });
|
||||
|
||||
|
|
@ -55,7 +56,7 @@ const AuthProvider = (props: any) => {
|
|||
};
|
||||
}, []);
|
||||
|
||||
return <AuthContext.Provider value={auth}>{props.children}</AuthContext.Provider>;
|
||||
return <AuthContext.Provider value={auth}>{children}</AuthContext.Provider>;
|
||||
};
|
||||
|
||||
export default AuthProvider;
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
"use client";
|
||||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
import { HeaderProfileBox } from "../../Security/HeaderProfileBox";
|
||||
import learnhouseIcon from "public/learnhouse_icon.png";
|
||||
import learnhouseLogo from "public/learnhouse_logo.png";
|
||||
import Link from "next/link";
|
||||
import Image from "next/legacy/image";
|
||||
import { useRouter } from "next/router";
|
||||
import Image from "next/image";
|
||||
import { useRouter, useSearchParams } from "next/navigation";
|
||||
import { headers } from 'next/headers';
|
||||
|
||||
export const Menu = () => {
|
||||
const router = useRouter();
|
||||
const { orgslug } = router.query;
|
||||
export const Menu = ({orgslug } : any) => {
|
||||
|
||||
return (
|
||||
<GlobalHeader>
|
||||
|
|
@ -30,10 +30,10 @@ export const Menu = () => {
|
|||
<MenuArea>
|
||||
<ul>
|
||||
<li>
|
||||
<Link href={"/org/" + orgslug + "/courses"}>Courses</Link>
|
||||
<Link href={ "/courses"}>Courses</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href={"/org/" + orgslug + "/collections"}>Collections</Link>
|
||||
<Link href={ "/collections"}>Collections</Link>
|
||||
</li>
|
||||
<li>Activity</li>
|
||||
<li>More</li>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
import React from "react";
|
||||
import Head from "next/head";
|
||||
import styled from "styled-components";
|
||||
|
|
@ -13,15 +14,11 @@ const Layout = (props: any) => {
|
|||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<html>
|
||||
<body>
|
||||
<AuthProvider>
|
||||
<Head>
|
||||
<title>{props.title}</title>
|
||||
<meta name="description" content={props.description} />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
<ProjectPhaseLabel>🚧 Dev Phase</ProjectPhaseLabel>
|
||||
<Menu></Menu>
|
||||
<Menu orgslug={props.orgslug}></Menu>
|
||||
<motion.main
|
||||
variants={variants} // Pass the variant object into Framer Motion
|
||||
initial="hidden" // Set the initial state to variants.hidden
|
||||
|
|
@ -36,7 +33,8 @@ const Layout = (props: any) => {
|
|||
<p>LearnHouse © 2021 - {new Date().getFullYear()} - All rights reserved</p>
|
||||
</Footer>
|
||||
</AuthProvider>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
63
front/middleware.ts
Normal file
63
front/middleware.ts
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
export const config = {
|
||||
matcher: [
|
||||
/*
|
||||
* Match all paths except for:
|
||||
* 1. /api routes
|
||||
* 2. /_next (Next.js internals)
|
||||
* 3. /fonts (inside /public)
|
||||
* 4. /examples (inside /public)
|
||||
* 5. all root files inside /public (e.g. /favicon.ico)
|
||||
*/
|
||||
"/((?!api|_next|fonts|login|signup|examples|[\\w-]+\\.\\w+).*)",
|
||||
],
|
||||
};
|
||||
|
||||
export default function middleware(req: NextRequest) {
|
||||
const url = req.nextUrl;
|
||||
|
||||
// Get hostname of request (e.g. demo.vercel.pub, demo.localhost:3000)
|
||||
const hostname = req.headers.get("host") || "learnhouse.app";
|
||||
|
||||
// Only for demo purposes - remove this if you want to use your root domain as the landing page
|
||||
if (hostname === "vercel.pub" || hostname === "platforms.vercel.app") {
|
||||
return NextResponse.redirect("https://demo.vercel.pub");
|
||||
}
|
||||
|
||||
/* You have to replace ".vercel.pub" with your own domain if you deploy this example under your domain.
|
||||
You can also use wildcard subdomains on .vercel.app links that are associated with your Vercel team slug
|
||||
in this case, our team slug is "platformize", thus *.platformize.vercel.app works. Do note that you'll
|
||||
still need to add "*.platformize.vercel.app" as a wildcard domain on your Vercel dashboard. */
|
||||
let currentHost =
|
||||
process.env.NODE_ENV === "production" && process.env.VERCEL === "1"
|
||||
? hostname.replace(`.vercel.pub`, "").replace(`.platformize.vercel.app`, "")
|
||||
: hostname.replace(`.localhost:3000`, "");
|
||||
|
||||
// if url starts with "/organizations" rewrite to path
|
||||
if (url.pathname.startsWith("/organizations")) {
|
||||
url.pathname = url.pathname.replace("/organizations", `/organizations/${currentHost}`);
|
||||
// remove localhost:3000 from url
|
||||
url.pathname = url.pathname.replace(`localhost:3000`, "");
|
||||
console.log(url);
|
||||
|
||||
return NextResponse.rewrite(url);
|
||||
}
|
||||
|
||||
else if (url.pathname.startsWith("/org")) {
|
||||
url.pathname = url.pathname.replace("/organizations", `/_orgs/${currentHost}`);
|
||||
// remove localhost:3000 from url
|
||||
|
||||
url.pathname = `/_orgs/${currentHost}${url.pathname}`;
|
||||
url.pathname = url.pathname.replace(`localhost:3000/org/`, "");
|
||||
console.log(url);
|
||||
|
||||
return NextResponse.rewrite(url);
|
||||
}
|
||||
|
||||
// rewrite everything else to `/_sites/[site] dynamic route
|
||||
url.pathname = `/_orgs/${currentHost}${url.pathname}`;
|
||||
console.log(url);
|
||||
|
||||
return NextResponse.rewrite(url, { headers: { "olgslug": currentHost } });
|
||||
}
|
||||
|
|
@ -1,6 +1,9 @@
|
|||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
reactStrictMode: false,
|
||||
experimental: {
|
||||
appDir : true,
|
||||
},
|
||||
swcMinify: true,
|
||||
compiler: {
|
||||
styledComponents: true,
|
||||
|
|
|
|||
266
front/package-lock.json
generated
266
front/package-lock.json
generated
|
|
@ -19,7 +19,7 @@
|
|||
"avvvatars-react": "^0.4.2",
|
||||
"framer-motion": "^7.3.6",
|
||||
"lucide-react": "^0.104.1",
|
||||
"next": "^13.0.6",
|
||||
"next": "^13.1.0",
|
||||
"react": "^18.2.0",
|
||||
"react-beautiful-dnd": "^13.1.1",
|
||||
"react-dom": "^18.2.0",
|
||||
|
|
@ -501,9 +501,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@next/env": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.0.6.tgz",
|
||||
"integrity": "sha512-yceT6DCHKqPRS1cAm8DHvDvK74DLIkDQdm5iV+GnIts8h0QbdHvkUIkdOvQoOODgpr6018skbmSQp12z5OWIQQ=="
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.1.1.tgz",
|
||||
"integrity": "sha512-vFMyXtPjSAiOXOywMojxfKIqE3VWN5RCAx+tT3AS3pcKjMLFTCJFUWsKv8hC+87Z1F4W3r68qTwDFZIFmd5Xkw=="
|
||||
},
|
||||
"node_modules/@next/eslint-plugin-next": {
|
||||
"version": "13.0.6",
|
||||
|
|
@ -515,9 +515,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@next/swc-android-arm-eabi": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.0.6.tgz",
|
||||
"integrity": "sha512-FGFSj3v2Bluw8fD/X+1eXIEB0PhoJE0zfutsAauRhmNpjjZshLDgoXMWm1jTRL/04K/o9gwwO2+A8+sPVCH1uw==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.1.tgz",
|
||||
"integrity": "sha512-qnFCx1kT3JTWhWve4VkeWuZiyjG0b5T6J2iWuin74lORCupdrNukxkq9Pm+Z7PsatxuwVJMhjUoYz7H4cWzx2A==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
|
|
@ -530,9 +530,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@next/swc-android-arm64": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.0.6.tgz",
|
||||
"integrity": "sha512-7MgbtU7kimxuovVsd7jSJWMkIHBDBUsNLmmlkrBRHTvgzx5nDBXogP0hzZm7EImdOPwVMPpUHRQMBP9mbsiJYQ==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.1.1.tgz",
|
||||
"integrity": "sha512-eCiZhTzjySubNqUnNkQCjU3Fh+ep3C6b5DCM5FKzsTH/3Gr/4Y7EiaPZKILbvnXmhWtKPIdcY6Zjx51t4VeTfA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
|
|
@ -545,9 +545,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@next/swc-darwin-arm64": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.0.6.tgz",
|
||||
"integrity": "sha512-AUVEpVTxbP/fxdFsjVI9d5a0CFn6NVV7A/RXOb0Y+pXKIIZ1V5rFjPwpYfIfyOo2lrqgehMNQcyMRoTrhq04xg==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.1.1.tgz",
|
||||
"integrity": "sha512-9zRJSSIwER5tu9ADDkPw5rIZ+Np44HTXpYMr0rkM656IvssowPxmhK0rTreC1gpUCYwFsRbxarUJnJsTWiutPg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
|
|
@ -560,9 +560,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@next/swc-darwin-x64": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.0.6.tgz",
|
||||
"integrity": "sha512-SasCDJlshglsPnbzhWaIF6VEGkQy2NECcAOxPwaPr0cwbbt4aUlZ7QmskNzgolr5eAjFS/xTr7CEeKJtZpAAtQ==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.1.tgz",
|
||||
"integrity": "sha512-qWr9qEn5nrnlhB0rtjSdR00RRZEtxg4EGvicIipqZWEyayPxhUu6NwKiG8wZiYZCLfJ5KWr66PGSNeDMGlNaiA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
|
@ -575,9 +575,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@next/swc-freebsd-x64": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.0.6.tgz",
|
||||
"integrity": "sha512-6Lbxd9gAdXneTkwHyYW/qtX1Tdw7ND9UbiGsGz/SP43ZInNWnW6q0au4hEVPZ9bOWWRKzcVoeTBdoMpQk9Hx9w==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.1.tgz",
|
||||
"integrity": "sha512-UwP4w/NcQ7V/VJEj3tGVszgb4pyUCt3lzJfUhjDMUmQbzG9LDvgiZgAGMYH6L21MoyAATJQPDGiAMWAPKsmumA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
|
@ -590,9 +590,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-arm-gnueabihf": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.0.6.tgz",
|
||||
"integrity": "sha512-wNdi5A519e1P+ozEuYOhWPzzE6m1y7mkO6NFwn6watUwO0X9nZs7fT9THmnekvmFQpaZ6U+xf2MQ9poQoCh6jQ==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.1.tgz",
|
||||
"integrity": "sha512-CnsxmKHco9sosBs1XcvCXP845Db+Wx1G0qouV5+Gr+HT/ZlDYEWKoHVDgnJXLVEQzq4FmHddBNGbXvgqM1Gfkg==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
|
|
@ -605,9 +605,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-arm64-gnu": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.0.6.tgz",
|
||||
"integrity": "sha512-e8KTRnleQY1KLk5PwGV5hrmvKksCc74QRpHl5ffWnEEAtL2FE0ave5aIkXqErsPdXkiKuA/owp3LjQrP+/AH7Q==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.1.tgz",
|
||||
"integrity": "sha512-JfDq1eri5Dif+VDpTkONRd083780nsMCOKoFG87wA0sa4xL8LGcXIBAkUGIC1uVy9SMsr2scA9CySLD/i+Oqiw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
|
|
@ -620,9 +620,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-arm64-musl": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.0.6.tgz",
|
||||
"integrity": "sha512-/7RF03C3mhjYpHN+pqOolgME3guiHU5T3TsejuyteqyEyzdEyLHod+jcYH6ft7UZ71a6TdOewvmbLOtzHW2O8A==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.1.tgz",
|
||||
"integrity": "sha512-GA67ZbDq2AW0CY07zzGt07M5b5Yaq5qUpFIoW3UFfjOPgb0Sqf3DAW7GtFMK1sF4ROHsRDMGQ9rnT0VM2dVfKA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
|
|
@ -635,9 +635,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-x64-gnu": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.0.6.tgz",
|
||||
"integrity": "sha512-kxyEXnYHpOEkFnmrlwB1QlzJtjC6sAJytKcceIyFUHbCaD3W/Qb5tnclcnHKTaFccizZRePXvV25Ok/eUSpKTw==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.1.tgz",
|
||||
"integrity": "sha512-nnjuBrbzvqaOJaV+XgT8/+lmXrSCOt1YYZn/irbDb2fR2QprL6Q7WJNgwsZNxiLSfLdv+2RJGGegBx9sLBEzGA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
|
@ -650,9 +650,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-x64-musl": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.0.6.tgz",
|
||||
"integrity": "sha512-N0c6gubS3WW1oYYgo02xzZnNatfVQP/CiJq2ax+DJ55ePV62IACbRCU99TZNXXg+Kos6vNW4k+/qgvkvpGDeyA==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.1.tgz",
|
||||
"integrity": "sha512-CM9xnAQNIZ8zf/igbIT/i3xWbQZYaF397H+JroF5VMOCUleElaMdQLL5riJml8wUfPoN3dtfn2s4peSr3azz/g==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
|
@ -665,9 +665,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-arm64-msvc": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.0.6.tgz",
|
||||
"integrity": "sha512-QjeMB2EBqBFPb/ac0CYr7GytbhUkrG4EwFWbcE0vsRp4H8grt25kYpFQckL4Jak3SUrp7vKfDwZ/SwO7QdO8vw==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.1.tgz",
|
||||
"integrity": "sha512-pzUHOGrbgfGgPlOMx9xk3QdPJoRPU+om84hqVoe6u+E0RdwOG0Ho/2UxCgDqmvpUrMab1Deltlt6RqcXFpnigQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
|
|
@ -680,9 +680,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-ia32-msvc": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.0.6.tgz",
|
||||
"integrity": "sha512-EQzXtdqRTcmhT/tCq81rIwE36Y3fNHPInaCuJzM/kftdXfa0F+64y7FAoMO13npX8EG1+SamXgp/emSusKrCXg==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.1.tgz",
|
||||
"integrity": "sha512-WeX8kVS46aobM9a7Xr/kEPcrTyiwJqQv/tbw6nhJ4fH9xNZ+cEcyPoQkwPo570dCOLz3Zo9S2q0E6lJ/EAUOBg==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
|
|
@ -695,9 +695,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-x64-msvc": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.0.6.tgz",
|
||||
"integrity": "sha512-pSkqZ//UP/f2sS9T7IvHLfEWDPTX0vRyXJnAUNisKvO3eF3e1xdhDX7dix/X3Z3lnN4UjSwOzclAI87JFbOwmQ==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.1.tgz",
|
||||
"integrity": "sha512-mVF0/3/5QAc5EGVnb8ll31nNvf3BWpPY4pBb84tk+BfQglWLqc5AC9q1Ht/YMWiEgs8ALNKEQ3GQnbY0bJF2Gg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
|
@ -3561,9 +3561,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/json5": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
|
||||
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
|
||||
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"minimist": "^1.2.0"
|
||||
|
|
@ -3757,15 +3757,15 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/next": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-13.0.6.tgz",
|
||||
"integrity": "sha512-COvigvms2LRt1rrzfBQcMQ2GZd86Mvk1z+LOLY5pniFtL4VrTmhZ9salrbKfSiXbhsD01TrDdD68ec3ABDyscA==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-13.1.1.tgz",
|
||||
"integrity": "sha512-R5eBAaIa3X7LJeYvv1bMdGnAVF4fVToEjim7MkflceFPuANY3YyvFxXee/A+acrSYwYPvOvf7f6v/BM/48ea5w==",
|
||||
"dependencies": {
|
||||
"@next/env": "13.0.6",
|
||||
"@next/env": "13.1.1",
|
||||
"@swc/helpers": "0.4.14",
|
||||
"caniuse-lite": "^1.0.30001406",
|
||||
"postcss": "8.4.14",
|
||||
"styled-jsx": "5.1.0"
|
||||
"styled-jsx": "5.1.1"
|
||||
},
|
||||
"bin": {
|
||||
"next": "dist/bin/next"
|
||||
|
|
@ -3774,19 +3774,19 @@
|
|||
"node": ">=14.6.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@next/swc-android-arm-eabi": "13.0.6",
|
||||
"@next/swc-android-arm64": "13.0.6",
|
||||
"@next/swc-darwin-arm64": "13.0.6",
|
||||
"@next/swc-darwin-x64": "13.0.6",
|
||||
"@next/swc-freebsd-x64": "13.0.6",
|
||||
"@next/swc-linux-arm-gnueabihf": "13.0.6",
|
||||
"@next/swc-linux-arm64-gnu": "13.0.6",
|
||||
"@next/swc-linux-arm64-musl": "13.0.6",
|
||||
"@next/swc-linux-x64-gnu": "13.0.6",
|
||||
"@next/swc-linux-x64-musl": "13.0.6",
|
||||
"@next/swc-win32-arm64-msvc": "13.0.6",
|
||||
"@next/swc-win32-ia32-msvc": "13.0.6",
|
||||
"@next/swc-win32-x64-msvc": "13.0.6"
|
||||
"@next/swc-android-arm-eabi": "13.1.1",
|
||||
"@next/swc-android-arm64": "13.1.1",
|
||||
"@next/swc-darwin-arm64": "13.1.1",
|
||||
"@next/swc-darwin-x64": "13.1.1",
|
||||
"@next/swc-freebsd-x64": "13.1.1",
|
||||
"@next/swc-linux-arm-gnueabihf": "13.1.1",
|
||||
"@next/swc-linux-arm64-gnu": "13.1.1",
|
||||
"@next/swc-linux-arm64-musl": "13.1.1",
|
||||
"@next/swc-linux-x64-gnu": "13.1.1",
|
||||
"@next/swc-linux-x64-musl": "13.1.1",
|
||||
"@next/swc-win32-arm64-msvc": "13.1.1",
|
||||
"@next/swc-win32-ia32-msvc": "13.1.1",
|
||||
"@next/swc-win32-x64-msvc": "13.1.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"fibers": ">= 3.1.0",
|
||||
|
|
@ -4859,9 +4859,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/styled-jsx": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.0.tgz",
|
||||
"integrity": "sha512-/iHaRJt9U7T+5tp6TRelLnqBqiaIT0HsO0+vgyj8hK2KUk7aejFqRrumqPUlAqDwAj8IbS/1hk3IhBAAK/FCUQ==",
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz",
|
||||
"integrity": "sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==",
|
||||
"dependencies": {
|
||||
"client-only": "0.0.1"
|
||||
},
|
||||
|
|
@ -5709,9 +5709,9 @@
|
|||
}
|
||||
},
|
||||
"@next/env": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.0.6.tgz",
|
||||
"integrity": "sha512-yceT6DCHKqPRS1cAm8DHvDvK74DLIkDQdm5iV+GnIts8h0QbdHvkUIkdOvQoOODgpr6018skbmSQp12z5OWIQQ=="
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.1.1.tgz",
|
||||
"integrity": "sha512-vFMyXtPjSAiOXOywMojxfKIqE3VWN5RCAx+tT3AS3pcKjMLFTCJFUWsKv8hC+87Z1F4W3r68qTwDFZIFmd5Xkw=="
|
||||
},
|
||||
"@next/eslint-plugin-next": {
|
||||
"version": "13.0.6",
|
||||
|
|
@ -5723,81 +5723,81 @@
|
|||
}
|
||||
},
|
||||
"@next/swc-android-arm-eabi": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.0.6.tgz",
|
||||
"integrity": "sha512-FGFSj3v2Bluw8fD/X+1eXIEB0PhoJE0zfutsAauRhmNpjjZshLDgoXMWm1jTRL/04K/o9gwwO2+A8+sPVCH1uw==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.1.tgz",
|
||||
"integrity": "sha512-qnFCx1kT3JTWhWve4VkeWuZiyjG0b5T6J2iWuin74lORCupdrNukxkq9Pm+Z7PsatxuwVJMhjUoYz7H4cWzx2A==",
|
||||
"optional": true
|
||||
},
|
||||
"@next/swc-android-arm64": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.0.6.tgz",
|
||||
"integrity": "sha512-7MgbtU7kimxuovVsd7jSJWMkIHBDBUsNLmmlkrBRHTvgzx5nDBXogP0hzZm7EImdOPwVMPpUHRQMBP9mbsiJYQ==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.1.1.tgz",
|
||||
"integrity": "sha512-eCiZhTzjySubNqUnNkQCjU3Fh+ep3C6b5DCM5FKzsTH/3Gr/4Y7EiaPZKILbvnXmhWtKPIdcY6Zjx51t4VeTfA==",
|
||||
"optional": true
|
||||
},
|
||||
"@next/swc-darwin-arm64": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.0.6.tgz",
|
||||
"integrity": "sha512-AUVEpVTxbP/fxdFsjVI9d5a0CFn6NVV7A/RXOb0Y+pXKIIZ1V5rFjPwpYfIfyOo2lrqgehMNQcyMRoTrhq04xg==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.1.1.tgz",
|
||||
"integrity": "sha512-9zRJSSIwER5tu9ADDkPw5rIZ+Np44HTXpYMr0rkM656IvssowPxmhK0rTreC1gpUCYwFsRbxarUJnJsTWiutPg==",
|
||||
"optional": true
|
||||
},
|
||||
"@next/swc-darwin-x64": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.0.6.tgz",
|
||||
"integrity": "sha512-SasCDJlshglsPnbzhWaIF6VEGkQy2NECcAOxPwaPr0cwbbt4aUlZ7QmskNzgolr5eAjFS/xTr7CEeKJtZpAAtQ==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.1.tgz",
|
||||
"integrity": "sha512-qWr9qEn5nrnlhB0rtjSdR00RRZEtxg4EGvicIipqZWEyayPxhUu6NwKiG8wZiYZCLfJ5KWr66PGSNeDMGlNaiA==",
|
||||
"optional": true
|
||||
},
|
||||
"@next/swc-freebsd-x64": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.0.6.tgz",
|
||||
"integrity": "sha512-6Lbxd9gAdXneTkwHyYW/qtX1Tdw7ND9UbiGsGz/SP43ZInNWnW6q0au4hEVPZ9bOWWRKzcVoeTBdoMpQk9Hx9w==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.1.tgz",
|
||||
"integrity": "sha512-UwP4w/NcQ7V/VJEj3tGVszgb4pyUCt3lzJfUhjDMUmQbzG9LDvgiZgAGMYH6L21MoyAATJQPDGiAMWAPKsmumA==",
|
||||
"optional": true
|
||||
},
|
||||
"@next/swc-linux-arm-gnueabihf": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.0.6.tgz",
|
||||
"integrity": "sha512-wNdi5A519e1P+ozEuYOhWPzzE6m1y7mkO6NFwn6watUwO0X9nZs7fT9THmnekvmFQpaZ6U+xf2MQ9poQoCh6jQ==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.1.tgz",
|
||||
"integrity": "sha512-CnsxmKHco9sosBs1XcvCXP845Db+Wx1G0qouV5+Gr+HT/ZlDYEWKoHVDgnJXLVEQzq4FmHddBNGbXvgqM1Gfkg==",
|
||||
"optional": true
|
||||
},
|
||||
"@next/swc-linux-arm64-gnu": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.0.6.tgz",
|
||||
"integrity": "sha512-e8KTRnleQY1KLk5PwGV5hrmvKksCc74QRpHl5ffWnEEAtL2FE0ave5aIkXqErsPdXkiKuA/owp3LjQrP+/AH7Q==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.1.tgz",
|
||||
"integrity": "sha512-JfDq1eri5Dif+VDpTkONRd083780nsMCOKoFG87wA0sa4xL8LGcXIBAkUGIC1uVy9SMsr2scA9CySLD/i+Oqiw==",
|
||||
"optional": true
|
||||
},
|
||||
"@next/swc-linux-arm64-musl": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.0.6.tgz",
|
||||
"integrity": "sha512-/7RF03C3mhjYpHN+pqOolgME3guiHU5T3TsejuyteqyEyzdEyLHod+jcYH6ft7UZ71a6TdOewvmbLOtzHW2O8A==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.1.tgz",
|
||||
"integrity": "sha512-GA67ZbDq2AW0CY07zzGt07M5b5Yaq5qUpFIoW3UFfjOPgb0Sqf3DAW7GtFMK1sF4ROHsRDMGQ9rnT0VM2dVfKA==",
|
||||
"optional": true
|
||||
},
|
||||
"@next/swc-linux-x64-gnu": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.0.6.tgz",
|
||||
"integrity": "sha512-kxyEXnYHpOEkFnmrlwB1QlzJtjC6sAJytKcceIyFUHbCaD3W/Qb5tnclcnHKTaFccizZRePXvV25Ok/eUSpKTw==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.1.tgz",
|
||||
"integrity": "sha512-nnjuBrbzvqaOJaV+XgT8/+lmXrSCOt1YYZn/irbDb2fR2QprL6Q7WJNgwsZNxiLSfLdv+2RJGGegBx9sLBEzGA==",
|
||||
"optional": true
|
||||
},
|
||||
"@next/swc-linux-x64-musl": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.0.6.tgz",
|
||||
"integrity": "sha512-N0c6gubS3WW1oYYgo02xzZnNatfVQP/CiJq2ax+DJ55ePV62IACbRCU99TZNXXg+Kos6vNW4k+/qgvkvpGDeyA==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.1.tgz",
|
||||
"integrity": "sha512-CM9xnAQNIZ8zf/igbIT/i3xWbQZYaF397H+JroF5VMOCUleElaMdQLL5riJml8wUfPoN3dtfn2s4peSr3azz/g==",
|
||||
"optional": true
|
||||
},
|
||||
"@next/swc-win32-arm64-msvc": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.0.6.tgz",
|
||||
"integrity": "sha512-QjeMB2EBqBFPb/ac0CYr7GytbhUkrG4EwFWbcE0vsRp4H8grt25kYpFQckL4Jak3SUrp7vKfDwZ/SwO7QdO8vw==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.1.tgz",
|
||||
"integrity": "sha512-pzUHOGrbgfGgPlOMx9xk3QdPJoRPU+om84hqVoe6u+E0RdwOG0Ho/2UxCgDqmvpUrMab1Deltlt6RqcXFpnigQ==",
|
||||
"optional": true
|
||||
},
|
||||
"@next/swc-win32-ia32-msvc": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.0.6.tgz",
|
||||
"integrity": "sha512-EQzXtdqRTcmhT/tCq81rIwE36Y3fNHPInaCuJzM/kftdXfa0F+64y7FAoMO13npX8EG1+SamXgp/emSusKrCXg==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.1.tgz",
|
||||
"integrity": "sha512-WeX8kVS46aobM9a7Xr/kEPcrTyiwJqQv/tbw6nhJ4fH9xNZ+cEcyPoQkwPo570dCOLz3Zo9S2q0E6lJ/EAUOBg==",
|
||||
"optional": true
|
||||
},
|
||||
"@next/swc-win32-x64-msvc": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.0.6.tgz",
|
||||
"integrity": "sha512-pSkqZ//UP/f2sS9T7IvHLfEWDPTX0vRyXJnAUNisKvO3eF3e1xdhDX7dix/X3Z3lnN4UjSwOzclAI87JFbOwmQ==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.1.tgz",
|
||||
"integrity": "sha512-mVF0/3/5QAc5EGVnb8ll31nNvf3BWpPY4pBb84tk+BfQglWLqc5AC9q1Ht/YMWiEgs8ALNKEQ3GQnbY0bJF2Gg==",
|
||||
"optional": true
|
||||
},
|
||||
"@nodelib/fs.scandir": {
|
||||
|
|
@ -7804,9 +7804,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"json5": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
|
||||
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
|
||||
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "^1.2.0"
|
||||
|
|
@ -7951,28 +7951,28 @@
|
|||
"dev": true
|
||||
},
|
||||
"next": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-13.0.6.tgz",
|
||||
"integrity": "sha512-COvigvms2LRt1rrzfBQcMQ2GZd86Mvk1z+LOLY5pniFtL4VrTmhZ9salrbKfSiXbhsD01TrDdD68ec3ABDyscA==",
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-13.1.1.tgz",
|
||||
"integrity": "sha512-R5eBAaIa3X7LJeYvv1bMdGnAVF4fVToEjim7MkflceFPuANY3YyvFxXee/A+acrSYwYPvOvf7f6v/BM/48ea5w==",
|
||||
"requires": {
|
||||
"@next/env": "13.0.6",
|
||||
"@next/swc-android-arm-eabi": "13.0.6",
|
||||
"@next/swc-android-arm64": "13.0.6",
|
||||
"@next/swc-darwin-arm64": "13.0.6",
|
||||
"@next/swc-darwin-x64": "13.0.6",
|
||||
"@next/swc-freebsd-x64": "13.0.6",
|
||||
"@next/swc-linux-arm-gnueabihf": "13.0.6",
|
||||
"@next/swc-linux-arm64-gnu": "13.0.6",
|
||||
"@next/swc-linux-arm64-musl": "13.0.6",
|
||||
"@next/swc-linux-x64-gnu": "13.0.6",
|
||||
"@next/swc-linux-x64-musl": "13.0.6",
|
||||
"@next/swc-win32-arm64-msvc": "13.0.6",
|
||||
"@next/swc-win32-ia32-msvc": "13.0.6",
|
||||
"@next/swc-win32-x64-msvc": "13.0.6",
|
||||
"@next/env": "13.1.1",
|
||||
"@next/swc-android-arm-eabi": "13.1.1",
|
||||
"@next/swc-android-arm64": "13.1.1",
|
||||
"@next/swc-darwin-arm64": "13.1.1",
|
||||
"@next/swc-darwin-x64": "13.1.1",
|
||||
"@next/swc-freebsd-x64": "13.1.1",
|
||||
"@next/swc-linux-arm-gnueabihf": "13.1.1",
|
||||
"@next/swc-linux-arm64-gnu": "13.1.1",
|
||||
"@next/swc-linux-arm64-musl": "13.1.1",
|
||||
"@next/swc-linux-x64-gnu": "13.1.1",
|
||||
"@next/swc-linux-x64-musl": "13.1.1",
|
||||
"@next/swc-win32-arm64-msvc": "13.1.1",
|
||||
"@next/swc-win32-ia32-msvc": "13.1.1",
|
||||
"@next/swc-win32-x64-msvc": "13.1.1",
|
||||
"@swc/helpers": "0.4.14",
|
||||
"caniuse-lite": "^1.0.30001406",
|
||||
"postcss": "8.4.14",
|
||||
"styled-jsx": "5.1.0"
|
||||
"styled-jsx": "5.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"postcss": {
|
||||
|
|
@ -8712,9 +8712,9 @@
|
|||
}
|
||||
},
|
||||
"styled-jsx": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.0.tgz",
|
||||
"integrity": "sha512-/iHaRJt9U7T+5tp6TRelLnqBqiaIT0HsO0+vgyj8hK2KUk7aejFqRrumqPUlAqDwAj8IbS/1hk3IhBAAK/FCUQ==",
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz",
|
||||
"integrity": "sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==",
|
||||
"requires": {
|
||||
"client-only": "0.0.1"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
"avvvatars-react": "^0.4.2",
|
||||
"framer-motion": "^7.3.6",
|
||||
"lucide-react": "^0.104.1",
|
||||
"next": "^13.0.6",
|
||||
"next": "^13.1.0",
|
||||
"react": "^18.2.0",
|
||||
"react-beautiful-dnd": "^13.1.1",
|
||||
"react-dom": "^18.2.0",
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
import '../styles/globals.css'
|
||||
import type { AppProps } from 'next/app'
|
||||
|
||||
function MyApp({ Component, pageProps }: AppProps) {
|
||||
return <Component {...pageProps} />
|
||||
}
|
||||
|
||||
export default MyApp
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
import React from "react";
|
||||
import { useRouter } from "next/router";
|
||||
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";
|
||||
|
||||
const OrgHomePage = () => {
|
||||
const router = useRouter();
|
||||
const { orgslug } = router.query;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Layout title={"Org "+orgslug}>
|
||||
<Header></Header>
|
||||
<Title>Welcome {orgslug} 👋🏻</Title>
|
||||
<Link href={orgslug + "/courses"}>
|
||||
|
||||
<button>See Courses </button>
|
||||
|
||||
</Link>
|
||||
</Layout>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default OrgHomePage;
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"esnext"
|
||||
],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
|
|
@ -13,15 +17,37 @@
|
|||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true
|
||||
"incremental": true,
|
||||
"plugins": [
|
||||
{
|
||||
"name": "next"
|
||||
}
|
||||
]
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
||||
"include": [
|
||||
"next-env.d.ts",
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
".next/types/**/*.ts"
|
||||
],
|
||||
"paths": {
|
||||
"@components/*": ["components/*"],
|
||||
"@public/*": ["public/*"],
|
||||
"@images/*": ["public/img/*"],
|
||||
"@services/*": ["services/*"],
|
||||
"@editor/*": ["components/Editor/*"]
|
||||
"@components/*": [
|
||||
"components/*"
|
||||
],
|
||||
"@public/*": [
|
||||
"public/*"
|
||||
],
|
||||
"@images/*": [
|
||||
"public/img/*"
|
||||
],
|
||||
"@services/*": [
|
||||
"services/*"
|
||||
],
|
||||
"@editor/*": [
|
||||
"components/Editor/*"
|
||||
]
|
||||
},
|
||||
"exclude": ["node_modules"]
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue