Skip to content

Commit

Permalink
Merge pull request #76 from gaditi123/general
Browse files Browse the repository at this point in the history
no handles added message on viewing a profile
  • Loading branch information
Jashpatel1 authored Apr 4, 2021
2 parents c04c905 + 2074b92 commit 4c92d59
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions stopstalk_app/lib/screens/profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ class _ProfileState extends State<ProfileScreen> {
),
],
)
: noHandles(),
: noHandles(snapshot.data.user.stopstalkHandle,
widget.isUserItself),
],
),
),
Expand Down Expand Up @@ -388,15 +389,17 @@ class _ProfileState extends State<ProfileScreen> {
);
}

Widget noHandles() {
Widget noHandles(String stopstalkHandle, bool isUserItself) {
return Container(
width: 300,
height: 300,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Text(
'Please add your competitive coding site handles on the website to view your stats and progress.',
isUserItself
? 'Please add your competitive coding site handles on the website to view your stats and progress.'
: '${stopstalkHandle} has not added any competitive coding site handles.',
style: TextStyle(fontSize: 15, fontWeight: FontWeight.w500),
)),
),
Expand Down
2 changes: 1 addition & 1 deletion stopstalk_app/lib/widgets/problems_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class ProblemsCard extends StatelessWidget {
children:
List<Widget>.generate(recom.tags.length, (int index) {
return Chip(
label: Text(recom.tags[index]),
label: Text(recom.tags[index].replaceAll(RegExp(r"'"), '')),
);
}),
),
Expand Down

0 comments on commit 4c92d59

Please sign in to comment.