Created a page the client wanted to start and resume assignments as a student
This commit is contained in:
@@ -13,10 +13,12 @@ export default function SessionCard({
|
||||
session,
|
||||
reload,
|
||||
loadSession,
|
||||
disableDelete = false
|
||||
}: {
|
||||
session: Session;
|
||||
reload: () => void;
|
||||
loadSession: (session: Session) => Promise<void>;
|
||||
disableDelete?: boolean
|
||||
}) {
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
@@ -95,7 +97,7 @@ export default function SessionCard({
|
||||
</button>
|
||||
<button
|
||||
onClick={deleteSession}
|
||||
disabled={isLoading}
|
||||
disabled={isLoading || disableDelete}
|
||||
className="bg-mti-red-ultralight w-full hover:bg-mti-red-light rounded-lg p-2 px-4 transition duration-300 ease-in-out hover:text-white disabled:cursor-not-allowed">
|
||||
{!isLoading && "Delete"}
|
||||
{isLoading && (
|
||||
|
||||
@@ -189,10 +189,7 @@ const StatsGridItem: React.FC<StatsGridItemProps> = ({
|
||||
};
|
||||
|
||||
const shouldRenderPDFIcon = () => {
|
||||
if (assignment) {
|
||||
return assignment.released;
|
||||
}
|
||||
|
||||
if (assignment) return assignment.released;
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user