fix: skip fetch if we have it in redux

This commit is contained in:
Markus
2026-08-05 20:15:56 +03:00
parent e6be6aa6a6
commit 1f7a893f62
@@ -21,6 +21,11 @@ import { Table, TableHead, TableRow, TableBody, TableCell } from '@mui/material'
class PeerReview extends React.Component {
async componentDidMount() {
// If we already have the questions and answers loaded in Redux we can skip fetching
if (this.props.answerSheet && this.props.answerSheet.length > 0 && !this.props.isInitializing) {
return
}
try {
const group = await groupManagementService.getByStudent()
if (group) {