Grade
- {this.props.grade}
+
+ {this.props.grade !== undefined ? this.props.grade : '???'}
+
-
-
- XP
- {this.props.xp}
-
-
+ {IS_XP_IMPLEMENTED ? (
+ <>
+ {/* TODO: Move tooltip out of this tenary once max grade for a
+ user is implemented in GET /user.
+ https://github.com/source-academy/cadet/issues/205 */}
+
+
+
+
+ XP
+
+
+ {this.props.xp ? this.props.xp : '???'}
+
+
+
+
+
+
+ >
+ ) : null}
>
)
diff --git a/src/containers/ProfileContainer.ts b/src/containers/ProfileContainer.ts
index c5298057e7..a18f4ba99e 100644
--- a/src/containers/ProfileContainer.ts
+++ b/src/containers/ProfileContainer.ts
@@ -3,13 +3,14 @@ import { connect, MapStateToProps } from 'react-redux'
import Profile, { StateProps } from '../components/dropdown/Profile'
import { IState } from '../reducers/states'
+// TODO: connect to actual state once backend implements these features
const mapStateToProps: MapStateToProps