-
Oganization Settings
+
Oganization Settings
{error &&
Failed to load
}
{!org ? (
@@ -55,15 +55,53 @@ function SettingsOrganizationGeneral(params: any) {
}}
>
{({ isSubmitting }) => (
-
+
+
)}
)}
diff --git a/front/app/organizations/page.tsx b/front/app/organizations/page.tsx
index 312ec33b..84b3fb64 100644
--- a/front/app/organizations/page.tsx
+++ b/front/app/organizations/page.tsx
@@ -9,38 +9,47 @@ import { getAPIUrl, getUriWithOrg } from "@services/config/config";
import AuthProvider from "@components/Security/AuthProvider";
const Organizations = () => {
- const { data : organizations , error } = useSWR(`${getAPIUrl()}orgs/user/page/1/limit/10`, swrFetcher)
+ const { data: organizations, error } = useSWR(`${getAPIUrl()}orgs/user/page/1/limit/10`, swrFetcher)
async function deleteOrganization(org_id: any) {
const response = await deleteOrganizationFromBackend(org_id);
- response && mutate(`${getAPIUrl()}orgs/user/page/1/limit/10`, organizations.filter((org: any) => org.org_id !== org_id));
+ response && mutate(`${getAPIUrl()}orgs/user/page/1/limit/10`, organizations.filter((org: any) => org.org_id !== org_id));
}
return (
<>
-
+
Your Organizations{" "}
-
-
+
+
- {error &&
Failed to load
}
+
+ {error &&
Failed to load
}
{!organizations ? (
-
Loading...
+
Loading...
) : (
{organizations.map((org: any) => (
-
-
-
{org.name}
+
+
+
{org.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}