diff --git a/src/app/components/content/IsaacContent.tsx b/src/app/components/content/IsaacContent.tsx
index d0afc96c82..f155f0df5b 100644
--- a/src/app/components/content/IsaacContent.tsx
+++ b/src/app/components/content/IsaacContent.tsx
@@ -1,4 +1,4 @@
-import React, {lazy, useRef} from "react";
+import React, {lazy} from "react";
import {AnvilApp} from "./AnvilApp";
import {IsaacContentValueOrChildren} from "./IsaacContentValueOrChildren";
import {IsaacQuestion} from "./IsaacQuestion";
@@ -21,8 +21,8 @@ import {isQuestion} from "../../services";
import {IsaacCodeTabs} from "./IsaacCodeTabs";
import {IsaacInteractiveCodeSnippet} from "./IsaacInteractiveCodeSnippet";
import {IsaacCallout} from "./IsaacCallout";
-import IsaacInlineRegion from "./IsaacInlineRegion";
import InlineContextProvider from "../elements/InlineContextProvider";
+
const IsaacCodeSnippet = lazy(() => import("./IsaacCodeSnippet"));
const classBasedLayouts = {
diff --git a/src/app/components/content/IsaacLLMFreeTextQuestion.tsx b/src/app/components/content/IsaacLLMFreeTextQuestion.tsx
index 0992ca32fe..9aaaa29c7a 100644
--- a/src/app/components/content/IsaacLLMFreeTextQuestion.tsx
+++ b/src/app/components/content/IsaacLLMFreeTextQuestion.tsx
@@ -1,10 +1,10 @@
import React from "react";
import {IsaacContentValueOrChildren} from "./IsaacContentValueOrChildren";
import {IsaacLLMFreeTextQuestionDTO, LLMFreeTextChoiceDTO} from "../../../IsaacApiTypes";
-import {Alert, FormGroup, Input} from "reactstrap";
+import {FormGroup, Input} from "reactstrap";
import {IsaacQuestionProps, ValidatedChoice} from "../../../IsaacAppTypes";
import {useCurrentQuestionAttempt} from "../../services";
-import { useCanAttemptQuestionTypeQuery } from "../../state";
+import {useCanAttemptQuestionTypeQuery} from "../../state";
interface Limit {
exceeded: boolean;
@@ -98,4 +98,4 @@ const IsaacLLMFreeTextQuestion = ({doc, questionId, readonly}: IsaacQuestionProp
);
};
-export default IsaacLLMFreeTextQuestion;
\ No newline at end of file
+export default IsaacLLMFreeTextQuestion;
diff --git a/src/app/components/content/IsaacNumericQuestion.tsx b/src/app/components/content/IsaacNumericQuestion.tsx
index 300a6c4b18..4a43b01f55 100644
--- a/src/app/components/content/IsaacNumericQuestion.tsx
+++ b/src/app/components/content/IsaacNumericQuestion.tsx
@@ -1,6 +1,5 @@
import React, {FormEvent, useMemo, useState} from "react";
import {AppState, useAppSelector, useGetConstantUnitsQuery} from "../../state";
-import Rand from 'rand-seed';
import {IsaacContentValueOrChildren} from "./IsaacContentValueOrChildren";
import {IsaacNumericQuestionDTO, QuantityDTO, QuantityValidationResponseDTO} from "../../../IsaacApiTypes";
import {
@@ -22,7 +21,7 @@ import {IsaacQuestionProps} from "../../../IsaacAppTypes";
import {Markup} from "../elements/markup";
import classNames from "classnames";
import QuestionInputValidation from "../elements/inputs/QuestionInputValidation";
-import { selectUnits, wrapUnitForSelect } from "../../services/numericUnits";
+import {selectUnits, wrapUnitForSelect} from "../../services/numericUnits";
export const numericInputValidator = (input: string) => {
const regexStr = "[^ 0-9EXex(){},.+*/\\^×÷-]";
diff --git a/src/app/components/content/IsaacSymbolicLogicQuestion.tsx b/src/app/components/content/IsaacSymbolicLogicQuestion.tsx
index e5355bf0f5..17a25219a8 100644
--- a/src/app/components/content/IsaacSymbolicLogicQuestion.tsx
+++ b/src/app/components/content/IsaacSymbolicLogicQuestion.tsx
@@ -4,11 +4,11 @@ import {IsaacContentValueOrChildren} from "./IsaacContentValueOrChildren";
import {IsaacSymbolicLogicQuestionDTO, LogicFormulaDTO} from "../../../IsaacApiTypes";
import katex from "katex";
import {
- ifKeyIsEnter, isAda,
+ ifKeyIsEnter,
isDefined,
- isStaff,
jsonHelper,
- sanitiseInequalityState, siteSpecific,
+ sanitiseInequalityState,
+ siteSpecific,
useCurrentQuestionAttempt,
useUserPreferences
} from "../../services";
@@ -18,7 +18,6 @@ import {v4 as uuid_v4} from "uuid";
import {Inequality, makeInequality} from 'inequality';
import {parseBooleanExpression, ParsingError} from 'inequality-grammar';
import {IsaacQuestionProps} from "../../../IsaacAppTypes";
-import classNames from "classnames";
import QuestionInputValidation from "../elements/inputs/QuestionInputValidation";
const InequalityModal = lazy(() => import("../elements/modals/inequality/InequalityModal"));
diff --git a/src/app/components/content/IsaacSymbolicQuestion.tsx b/src/app/components/content/IsaacSymbolicQuestion.tsx
index 273ad5914c..d1668d7f33 100644
--- a/src/app/components/content/IsaacSymbolicQuestion.tsx
+++ b/src/app/components/content/IsaacSymbolicQuestion.tsx
@@ -1,4 +1,14 @@
-import React, {ChangeEvent, lazy, Suspense, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState} from "react";
+import React, {
+ ChangeEvent,
+ lazy,
+ Suspense,
+ useCallback,
+ useEffect,
+ useLayoutEffect,
+ useMemo,
+ useRef,
+ useState
+} from "react";
import {IsaacContentValueOrChildren} from "./IsaacContentValueOrChildren";
import {FormulaDTO, IsaacSymbolicQuestionDTO} from "../../../IsaacApiTypes";
import katex from "katex";
@@ -6,18 +16,18 @@ import {
ifKeyIsEnter,
isDefined,
jsonHelper,
- sanitiseInequalityState,
parsePseudoSymbolicAvailableSymbols,
- useCurrentQuestionAttempt, isAda, siteSpecific
+ sanitiseInequalityState,
+ siteSpecific,
+ useCurrentQuestionAttempt
} from "../../services";
import {Inequality, makeInequality} from "inequality";
import {parseMathsExpression, ParsingError} from "inequality-grammar";
import _flattenDeep from 'lodash/flatMapDeep';
import {v4 as uuid_v4} from "uuid";
import {IsaacQuestionProps} from "../../../IsaacAppTypes";
-import classNames from "classnames";
import QuestionInputValidation from "../elements/inputs/QuestionInputValidation";
-import { InputGroup, Input, Button, UncontrolledTooltip } from "reactstrap";
+import {Button, Input, InputGroup, UncontrolledTooltip} from "reactstrap";
const InequalityModal = lazy(() => import("../elements/modals/inequality/InequalityModal"));
diff --git a/src/app/components/elements/LLMFreeTextQuestionFeedbackView.tsx b/src/app/components/elements/LLMFreeTextQuestionFeedbackView.tsx
index 3a53ec5f5d..b6417c78b4 100644
--- a/src/app/components/elements/LLMFreeTextQuestionFeedbackView.tsx
+++ b/src/app/components/elements/LLMFreeTextQuestionFeedbackView.tsx
@@ -1,13 +1,13 @@
-import React, { useEffect, useRef, useState } from 'react';
+import React, {useEffect, useRef, useState} from 'react';
import {LLMFreeTextQuestionValidationResponseDTO} from "../../../IsaacApiTypes";
-import {Alert, Button, Card, Table} from "reactstrap";
+import {Button, Table} from "reactstrap";
import {siteSpecific} from "../../services/siteConstants";
import {Immutable} from "immer";
-import { Link } from 'react-router-dom';
-import { StyledCheckbox } from './inputs/StyledCheckbox';
-import { logAction, selectors, useAppDispatch, useAppSelector } from '../../state';
-import { NOT_FOUND } from '../../services';
+import {Link} from 'react-router-dom';
+import {StyledCheckbox} from './inputs/StyledCheckbox';
+import {logAction, selectors, useAppDispatch, useAppSelector} from '../../state';
+import {NOT_FOUND} from '../../services';
const noFeedback = {disagree: false, partlyAgree: false, agree: false};
@@ -60,7 +60,7 @@ export default function LLMFreeTextQuestionFeedbackView({validationResponse, has
{hasSubmitted && <>
- {!sentFeedback
+ {!sentFeedback
?
Before submitting another response, please say whether you agree with the predicted mark.
@@ -92,7 +92,7 @@ export default function LLMFreeTextQuestionFeedbackView({validationResponse, has
>
Send feedback
-
+
:
Feedback submitted
diff --git a/src/app/components/elements/ReportAccordionButton.tsx b/src/app/components/elements/ReportAccordionButton.tsx
index ad0da568cd..1296c3334f 100644
--- a/src/app/components/elements/ReportAccordionButton.tsx
+++ b/src/app/components/elements/ReportAccordionButton.tsx
@@ -1,6 +1,5 @@
import React from "react";
import {logAction, useAppDispatch} from "../../state";
-import {isPhy} from "../../services";
interface ReportAccordionButtonProps {
pageId?: string,
@@ -48,4 +47,4 @@ export const ReportAccordionButton = ({pageId, sectionId, sectionTitle, sectionI
window.open(`/contact?preset=contentProblem${getContactFormParams()}`, "_blank");
}}
/>;
-};
\ No newline at end of file
+};
diff --git a/src/app/components/elements/ShareLink.tsx b/src/app/components/elements/ShareLink.tsx
index 86c20d6f30..279c77aa60 100644
--- a/src/app/components/elements/ShareLink.tsx
+++ b/src/app/components/elements/ShareLink.tsx
@@ -1,5 +1,5 @@
import React, {useEffect, useRef, useState} from "react";
-import {isAda, isMobile, isPhy, isTutorOrAbove, PATHS, siteSpecific, useOutsideCallback} from "../../services";
+import {isMobile, isPhy, isTutorOrAbove, PATHS, siteSpecific, useOutsideCallback} from "../../services";
import {selectors, useAppSelector} from "../../state";
import classNames from "classnames";
diff --git a/src/app/components/elements/TitleAndBreadcrumb.tsx b/src/app/components/elements/TitleAndBreadcrumb.tsx
index 552afc5b79..ac034597d9 100644
--- a/src/app/components/elements/TitleAndBreadcrumb.tsx
+++ b/src/app/components/elements/TitleAndBreadcrumb.tsx
@@ -2,7 +2,7 @@ import React, {ReactElement} from "react";
import {PageTitle, PageTitleProps} from "./PageTitle";
import {Breadcrumb, BreadcrumbItem} from "reactstrap";
import {Link} from "react-router-dom";
-import {CollectionType, HOME_CRUMB, isAda, isPhy, LinkInfo} from "../../services";
+import {CollectionType, HOME_CRUMB, isAda, LinkInfo} from "../../services";
import {Markup} from "./markup";
import classNames from "classnames";
diff --git a/src/app/components/elements/cards/NewsCard.tsx b/src/app/components/elements/cards/NewsCard.tsx
index d390c0af4f..264f079c86 100644
--- a/src/app/components/elements/cards/NewsCard.tsx
+++ b/src/app/components/elements/cards/NewsCard.tsx
@@ -1,11 +1,10 @@
import React from "react";
import {Link} from "react-router-dom";
-import {Button, Card, CardBody, CardFooter, CardImg, CardProps, CardText, CardTitle, Container} from "reactstrap";
+import {Card, CardBody, CardImg, CardProps, CardText} from "reactstrap";
import {IsaacPodDTO} from "../../../../IsaacApiTypes";
-import {apiHelper, isAppLink, siteSpecific} from "../../../services";
+import {apiHelper, siteSpecific} from "../../../services";
import classNames from "classnames";
-import { ExternalLink } from "../ExternalLink";
-import { AdaCard } from "./AdaCard";
+import {AdaCard} from "./AdaCard";
interface NewsCardProps extends CardProps {
newsItem: IsaacPodDTO;
diff --git a/src/app/components/elements/inputs/CountryInput.tsx b/src/app/components/elements/inputs/CountryInput.tsx
index 230be02d17..ba66af95d8 100644
--- a/src/app/components/elements/inputs/CountryInput.tsx
+++ b/src/app/components/elements/inputs/CountryInput.tsx
@@ -1,6 +1,6 @@
import {Immutable} from "immer";
import {ValidationUser} from "../../../../IsaacAppTypes";
-import {FormFeedback, FormGroup, Label} from "reactstrap";
+import {FormGroup, Label} from "reactstrap";
import classNames from "classnames";
import React, {ChangeEvent} from "react";
import {useGetCountriesQuery, useGetPriorityCountriesQuery,} from "../../../state";
diff --git a/src/app/components/elements/inputs/StyledCheckbox.tsx b/src/app/components/elements/inputs/StyledCheckbox.tsx
index 0290eef3d4..4eeaac0426 100644
--- a/src/app/components/elements/inputs/StyledCheckbox.tsx
+++ b/src/app/components/elements/inputs/StyledCheckbox.tsx
@@ -2,7 +2,7 @@ import React, {useEffect, useMemo, useState} from "react";
import {Input, InputProps} from "reactstrap";
import {v4} from "uuid";
import {Spacer} from "../Spacer";
-import { ifKeyIsEnter, isPhy } from "../../../services";
+import {ifKeyIsEnter} from "../../../services";
import classNames from "classnames";
// A custom checkbox, dealing with mouse and keyboard input. Pass `onChange((e : ChangeEvent) => void)`, `checked: bool`, and `label: Element` as required as props to use.
diff --git a/src/app/components/elements/inputs/UserContextAccountInput.tsx b/src/app/components/elements/inputs/UserContextAccountInput.tsx
index 96abd5a221..768f0a9dac 100644
--- a/src/app/components/elements/inputs/UserContextAccountInput.tsx
+++ b/src/app/components/elements/inputs/UserContextAccountInput.tsx
@@ -7,7 +7,6 @@ import {
getFilteredExamBoardOptions,
getFilteredStageOptions,
isAda,
- isDefined,
isPhy,
isTutorOrAbove,
siteSpecific,
@@ -21,7 +20,6 @@ import classNames from "classnames";
import {Immutable} from "immer";
import {StyledDropdown} from "./DropdownInput";
import isUndefined from "lodash/isUndefined";
-import { StyledCheckbox } from "./StyledCheckbox";
interface UserContextRowProps {
userContext: UserContext;
diff --git a/src/app/components/elements/inputs/UserContextPicker.tsx b/src/app/components/elements/inputs/UserContextPicker.tsx
index b1592ca135..3f4bc8df29 100644
--- a/src/app/components/elements/inputs/UserContextPicker.tsx
+++ b/src/app/components/elements/inputs/UserContextPicker.tsx
@@ -1,12 +1,12 @@
-import React, { useEffect, useState } from "react";
+import React, {useEffect, useState} from "react";
import {Col, FormGroup, Input, Label, Row, UncontrolledTooltip} from "reactstrap";
import {
EXAM_BOARD,
examBoardLabelMap,
getFilteredExamBoardOptions,
getFilteredStageOptions,
- history,
- isAda, isLoggedIn,
+ isAda,
+ isLoggedIn,
isStaff,
siteSpecific,
STAGE,
@@ -14,13 +14,7 @@ import {
useQueryParams,
useUserViewingContext
} from "../../../services";
-import {
- selectors,
- transientUserContextSlice,
- useAppDispatch,
- useAppSelector,
-} from "../../../state";
-import queryString from "query-string";
+import {selectors, transientUserContextSlice, useAppDispatch, useAppSelector,} from "../../../state";
export const UserContextPicker = ({className, hideLabels = true}: {className?: string; hideLabels?: boolean}) => {
const dispatch = useAppDispatch();
@@ -52,7 +46,7 @@ export const UserContextPicker = ({className, hideLabels = true}: {className?: s
if (isAda && !isLoggedIn(user) || isStaff(user)) {
return
-
+
{/* Stage Selector */}
{showStageSelector && <>
@@ -100,14 +94,14 @@ export const UserContextPicker = ({className, hideLabels = true}: {className?: s
dispatch(transientUserContextSlice.actions.setExamBoard(e.target.value as EXAM_BOARD));
}}
>
- {onlyOneBoard
- ?
+ {onlyOneBoard
+ ?
: getFilteredExamBoardOptions({byStages: [currentStage], includeNullOptions: true})
.map(item => )
}
>}
-
+
{showUnusualContextMessage &&
diff --git a/src/app/components/elements/panels/TeacherConnections.tsx b/src/app/components/elements/panels/TeacherConnections.tsx
index ed41d7c551..9c729a4c80 100644
--- a/src/app/components/elements/panels/TeacherConnections.tsx
+++ b/src/app/components/elements/panels/TeacherConnections.tsx
@@ -6,9 +6,9 @@ import {
showErrorToast,
useAppDispatch,
useChangeMyMembershipStatusMutation,
- useDeleteGroupMemberMutation,
useGetActiveAuthorisationsQuery,
- useGetGroupMembershipsQuery, useGetOtherUserAuthorisationsQuery,
+ useGetGroupMembershipsQuery,
+ useGetOtherUserAuthorisationsQuery,
useLazyGetTokenOwnerQuery
} from "../../../state";
import {
@@ -38,10 +38,10 @@ import {
revocationConfirmationModal,
tokenVerificationModal
} from "../modals/TeacherConnectionModalCreators";
-import { FixedSizeList } from "react-window";
-import { Spacer } from "../Spacer";
-import { MyAccountTab } from "./MyAccountTab";
-import { Input, UncontrolledTooltip, Form, InputGroup, Button, Col } from "reactstrap";
+import {FixedSizeList} from "react-window";
+import {Spacer} from "../Spacer";
+import {MyAccountTab} from "./MyAccountTab";
+import {Button, Col, Form, Input, InputGroup, UncontrolledTooltip} from "reactstrap";
const CONNECTIONS_ROW_HEIGHT = 40;
const CONNECTIONS_MAX_VISIBLE_ROWS = 10;
@@ -67,12 +67,12 @@ const ConnectionsHeader = ({enableSearch, setEnableSearch, setSearchText, title,
const deviceSize = useDeviceSize();
return
- {["xl", "lg", "xs"].indexOf(deviceSize) !== -1 ?
- <>{enableSearch ?
+ {["xl", "lg", "xs"].indexOf(deviceSize) !== -1 ?
+ <>{enableSearch ?
<>
setSearchText(e.target.value)}/>
- > :
+ > :
{title}
@@ -166,7 +166,7 @@ export const TeacherConnections = ({user, authToken, editingOtherUser, userToEdi
}
}
- return
Connect to your teacher
@@ -186,8 +186,8 @@ export const TeacherConnections = ({user, authToken, editingOtherUser, userToEdi
type="text" placeholder="Enter your code in here" value={authToken || undefined} className="py-4"
onChange={(e: React.ChangeEvent) => setAuthenticationToken(e.target.value)}
onKeyDown={(e) => {if (e.key === 'Enter') {
- processToken(e);
- e.preventDefault();
+ processToken(e);
+ e.preventDefault();
}}}
/>