Skip to content

Commit 5cbc6c5

Browse files
committed
fix(reviews): added check for no reviews available when no lessons completed
1 parent 8394db4 commit 5cbc6c5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib/features/review/reviews_list_page.dart

+5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ class _ReviewPageState extends State<ReviewPage> {
4242
if (snapshot.connectionState == ConnectionState.waiting) {
4343
return const CircularProgressIndicator();
4444
}
45+
if (snapshot.data!.docs.isEmpty) {
46+
return const Align(
47+
alignment: Alignment.topCenter,
48+
child: Text('Please do a lesson first to get a review.'));
49+
}
4550

4651
final card =
4752
snapshot.data!.docs.first.data() as Map<String, dynamic>;

0 commit comments

Comments
 (0)