diff --git a/webclient/src/Classes.js b/webclient/src/Classes.js
index 97dde37..d38b0ba 100644
--- a/webclient/src/Classes.js
+++ b/webclient/src/Classes.js
@@ -472,6 +472,7 @@ export function ClassDetail(props) {
const [refreshCount, refreshClass] = useReducer(x => x + 1, 0);
const [error, setError] = useState(false);
const [loading, setLoading] = useState(false);
+ const [override, setOverride] = useState(false);
const { token, user, refreshUser } = props;
const { id } = useParams();
const userTraining = clazz && clazz.students.find(x => x.user == user.id);
@@ -520,7 +521,8 @@ export function ClassDetail(props) {
setLoading(false);
}, [userTraining]);
- // TODO: calculate yesterday and lock signups
+ const now = new Date().toISOString();
+ const signupDisabled = clazz && clazz.datetime < now && !override;
return (
The class is full. This class has already ran.
+