mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 15:48:32 -06:00
some papercuts
This commit is contained in:
31
src/app/course/[courseName]/settings/GithubClassroomList.tsx
Normal file
31
src/app/course/[courseName]/settings/GithubClassroomList.tsx
Normal file
@@ -0,0 +1,31 @@
|
||||
"use client";
|
||||
import { useLocalCourseSettingsQuery } from "@/hooks/localCourse/localCoursesHooks";
|
||||
import { settingsBox } from "./sharedSettings";
|
||||
import { useCourseStudentsQuery } from "@/hooks/canvas/canvasCourseHooks";
|
||||
import { Spinner } from "@/components/Spinner";
|
||||
|
||||
export default function GithubClassroomList() {
|
||||
const [settings] = useLocalCourseSettingsQuery();
|
||||
const enrollmentsQuery = useCourseStudentsQuery(settings.canvasId);
|
||||
|
||||
if (enrollmentsQuery.isLoading)
|
||||
return (
|
||||
<div className={settingsBox}>
|
||||
<Spinner />
|
||||
</div>
|
||||
);
|
||||
return (
|
||||
<div className={settingsBox}>
|
||||
<h5 className="text-center">Github Classroom Friendly Roster</h5>
|
||||
<p className="text-center text-slate-500">
|
||||
Copy and paste this into github classroom to import students
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<code>
|
||||
{enrollmentsQuery.data?.map((student) => student.email + "\n")}
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user