mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
config updates
This commit is contained in:
2
build.sh
2
build.sh
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
MAJOR_VERSION="2"
|
MAJOR_VERSION="2"
|
||||||
MINOR_VERSION="7"
|
MINOR_VERSION="8"
|
||||||
VERSION="$MAJOR_VERSION.$MINOR_VERSION"
|
VERSION="$MAJOR_VERSION.$MINOR_VERSION"
|
||||||
|
|
||||||
TAG_FLAG=false
|
TAG_FLAG=false
|
||||||
|
|||||||
@@ -12,7 +12,11 @@ const compat = new FlatCompat({
|
|||||||
const eslintConfig = [
|
const eslintConfig = [
|
||||||
...compat.config({
|
...compat.config({
|
||||||
extends: ["next/core-web-vitals", "next/typescript", "prettier"],
|
extends: ["next/core-web-vitals", "next/typescript", "prettier"],
|
||||||
ignorePatterns: ["**/node_modules/**", "**/.next/**", "storage/**"],
|
ignores: [
|
||||||
|
"**/node_modules/**",
|
||||||
|
"**/.next/**",
|
||||||
|
"storage/**"
|
||||||
|
],
|
||||||
rules: {
|
rules: {
|
||||||
"react-refresh/only-export-components": "off", // Disabled the rule
|
"react-refresh/only-export-components": "off", // Disabled the rule
|
||||||
"@typescript-eslint/no-unused-vars": [
|
"@typescript-eslint/no-unused-vars": [
|
||||||
|
|||||||
@@ -23,22 +23,30 @@ import { Expandable } from "../../../../components/Expandable";
|
|||||||
import { useDragStyleContext } from "../context/drag/dragStyleContext";
|
import { useDragStyleContext } from "../context/drag/dragStyleContext";
|
||||||
import { useQuizzesQueries } from "@/hooks/localCourse/quizHooks";
|
import { useQuizzesQueries } from "@/hooks/localCourse/quizHooks";
|
||||||
import { useAssignmentNamesQuery } from "@/hooks/localCourse/assignmentHooks";
|
import { useAssignmentNamesQuery } from "@/hooks/localCourse/assignmentHooks";
|
||||||
import { trpc } from "@/services/serverFunctions/trpcClient";
|
import { useTRPC } from "@/services/serverFunctions/trpcClient";
|
||||||
|
import { useSuspenseQueries } from "@tanstack/react-query";
|
||||||
|
|
||||||
export default function ExpandableModule({
|
export default function ExpandableModule({
|
||||||
moduleName,
|
moduleName,
|
||||||
}: {
|
}: {
|
||||||
moduleName: string;
|
moduleName: string;
|
||||||
}) {
|
}) {
|
||||||
|
const trpc = useTRPC();
|
||||||
const { itemDropOnModule } = useDraggingContext();
|
const { itemDropOnModule } = useDraggingContext();
|
||||||
const { courseName } = useCourseContext();
|
const { courseName } = useCourseContext();
|
||||||
const { data: assignmentNames } = useAssignmentNamesQuery(moduleName);
|
const { data: assignmentNames } = useAssignmentNamesQuery(moduleName);
|
||||||
|
|
||||||
const [assignments] = trpc.useSuspenseQueries((t) =>
|
const assignmentsQueries = useSuspenseQueries({
|
||||||
assignmentNames.map((assignmentName) =>
|
queries: assignmentNames.map((assignmentName) =>
|
||||||
t.assignment.getAssignment({ courseName, moduleName, assignmentName })
|
trpc.assignment.getAssignment.queryOptions({
|
||||||
)
|
courseName,
|
||||||
);
|
moduleName,
|
||||||
|
assignmentName,
|
||||||
|
})
|
||||||
|
),
|
||||||
|
});
|
||||||
|
const assignments = assignmentsQueries.map((result) => result.data);
|
||||||
|
|
||||||
const { data: quizzes } = useQuizzesQueries(moduleName);
|
const { data: quizzes } = useQuizzesQueries(moduleName);
|
||||||
const { data: pages } = usePagesQueries(moduleName);
|
const { data: pages } = usePagesQueries(moduleName);
|
||||||
const modal = useModal();
|
const modal = useModal();
|
||||||
|
|||||||
Reference in New Issue
Block a user