From a5751b0a363b362144ab0854f29d0dcb8ebabdd4 Mon Sep 17 00:00:00 2001 From: swve Date: Sun, 14 May 2023 17:18:44 +0000 Subject: [PATCH] fix: css input issues --- .../course/[courseid]/edit/page.tsx | 4 +- .../(withmenu)/course/[courseid]/page.tsx | 40 ++++++++++--------- .../Pages/CourseEdit/Draggables/Activity.tsx | 34 +++++----------- .../Pages/CourseEdit/Draggables/Chapter.tsx | 6 +-- 4 files changed, 37 insertions(+), 47 deletions(-) diff --git a/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/edit/page.tsx b/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/edit/page.tsx index f77317c9..0422e5d0 100644 --- a/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/edit/page.tsx +++ b/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/edit/page.tsx @@ -96,10 +96,10 @@ function CourseEdit(params: any) { }; // Submit YouTube Video Upload - const submitExternalVideo = async (external_video_data : any, activity: any, chapterId: string) => { + const submitExternalVideo = async (external_video_data: any, activity: any, chapterId: string) => { console.log("submitExternalVideo", external_video_data); await updateChaptersMetadata(courseid, data); - await createExternalVideoActivity(external_video_data , activity, chapterId); + await createExternalVideoActivity(external_video_data, activity, chapterId); await getCourseChapters(); setNewActivityModal(false); }; diff --git a/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/page.tsx b/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/page.tsx index 37f0ce0e..a533d424 100644 --- a/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/page.tsx +++ b/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/page.tsx @@ -45,8 +45,8 @@ const CourseIdPage = (params: any) => { ) : (

-

Course

-

+

Course

+

{course.course.name}{" "} @@ -61,12 +61,12 @@ const CourseIdPage = (params: any) => { <> - + /> - + ); })} @@ -81,38 +81,42 @@ const CourseIdPage = (params: any) => { -

Description

+

Description

-

{course.course.description}

+

{course.course.description}

-

What you will learn

+

What you will learn

-

{course.course.learnings == ![] ? "no data" : course.course.learnings}

+

{course.course.learnings == ![] ? "no data" : course.course.learnings}

-

Course Lessons

+

Course Lessons

{course.chapters.map((chapter: any) => { return ( - <> -

{chapter.name}

- {chapter.activities.map((activity: any) => { +
+

{chapter.name}

+
{chapter.activities.map((activity: any) => { return ( <> -

+

{activity.name} - + {" "}

); - })} -      - + })}
+
); })}
diff --git a/front/components/Pages/CourseEdit/Draggables/Activity.tsx b/front/components/Pages/CourseEdit/Draggables/Activity.tsx index 3202099b..c3afd69d 100644 --- a/front/components/Pages/CourseEdit/Draggables/Activity.tsx +++ b/front/components/Pages/CourseEdit/Draggables/Activity.tsx @@ -1,6 +1,6 @@ import Link from "next/link"; import React from "react"; -import { Draggable } from "react-beautiful-dnd"; +import { Draggable } from "react-beautiful-dnd"; import { EyeOpenIcon, Pencil2Icon } from '@radix-ui/react-icons' import styled from "styled-components"; import { getUriWithOrg } from "@services/config/config"; @@ -10,38 +10,24 @@ function Activity(props: any) { return ( {(provided) => ( - +

{props.activity.name}

-   + href={getUriWithOrg(props.orgslug, "") + `/course/${props.courseid}/activity/${props.activity.id.replace("activity_", "")}`} + + rel="noopener noreferrer"> -   + - +
)}
); } -export const ActivityWrapper = styled.div` - padding: 2px; - padding-left: 17px; - list-style: none; - /* padding-left: 2px; */ - background-color: #f4f4f4c5; - border-radius: 7px; - margin: 15px; - display: flex; - align-items: center; - &:hover { - background-color: #8c949c7b; - } - -`; + export default Activity; diff --git a/front/components/Pages/CourseEdit/Draggables/Chapter.tsx b/front/components/Pages/CourseEdit/Draggables/Chapter.tsx index 850e189a..a26b1c86 100644 --- a/front/components/Pages/CourseEdit/Draggables/Chapter.tsx +++ b/front/components/Pages/CourseEdit/Draggables/Chapter.tsx @@ -1,7 +1,7 @@ import React from "react"; import styled from "styled-components"; import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd"; -import Activity, { ActivityWrapper } from "./Activity"; +import Activity from "./Activity"; function Chapter(props: any) { return ( @@ -14,8 +14,8 @@ function Chapter(props: any) { // isDragging={snapshot.isDragging} key={props.info.list.chapter.id} > -

- {props.info.list.chapter.name}{" "} +

+ {props.info.list.chapter.name}