Skip to content

Commit 4c92d59

Browse files
authored
Merge pull request #76 from gaditi123/general
no handles added message on viewing a profile
2 parents c04c905 + 2074b92 commit 4c92d59

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

stopstalk_app/lib/screens/profile.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,8 @@ class _ProfileState extends State<ProfileScreen> {
288288
),
289289
],
290290
)
291-
: noHandles(),
291+
: noHandles(snapshot.data.user.stopstalkHandle,
292+
widget.isUserItself),
292293
],
293294
),
294295
),
@@ -388,15 +389,17 @@ class _ProfileState extends State<ProfileScreen> {
388389
);
389390
}
390391

391-
Widget noHandles() {
392+
Widget noHandles(String stopstalkHandle, bool isUserItself) {
392393
return Container(
393394
width: 300,
394395
height: 300,
395396
child: Padding(
396397
padding: const EdgeInsets.all(8.0),
397398
child: Center(
398399
child: Text(
399-
'Please add your competitive coding site handles on the website to view your stats and progress.',
400+
isUserItself
401+
? 'Please add your competitive coding site handles on the website to view your stats and progress.'
402+
: '${stopstalkHandle} has not added any competitive coding site handles.',
400403
style: TextStyle(fontSize: 15, fontWeight: FontWeight.w500),
401404
)),
402405
),

stopstalk_app/lib/widgets/problems_card.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class ProblemsCard extends StatelessWidget {
198198
children:
199199
List<Widget>.generate(recom.tags.length, (int index) {
200200
return Chip(
201-
label: Text(recom.tags[index]),
201+
label: Text(recom.tags[index].replaceAll(RegExp(r"'"), '')),
202202
);
203203
}),
204204
),

0 commit comments

Comments
 (0)