Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-mayank committed Jul 1, 2024
1 parent 309e449 commit b8182f3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
2 changes: 2 additions & 0 deletions khelo/assets/locales/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,10 @@
"team_detail_member_tab_title": "Member",
"team_detail_empty_matches_title": "No matches scheduled yet!",
"team_detail_empty_matches_description_text": "Get your cricket game on! Schedule your cricket match with ease!",
"team_detail_visitor_empty_matches_description_text": "Until now, the team has not competed.",
"team_detail_empty_member_title": "You haven't any member!",
"team_detail_empty_member_description_text": "Invite your friends to build your dream team and start tracking matches together.",
"team_detail_visitor_empty_member_description_text": "No member has been added to the team.",
"team_detail_empty_stat_title": "No stats available yet!",
"team_detail_empty_stat_description_text": "The players are warming up! Stay tuned for exciting stats as the team progresses.",
"team_detail_add_member_title": "Add member",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ class TeamDetailMatchContent extends ConsumerWidget {
} else {
return EmptyScreen(
title: context.l10n.team_detail_empty_matches_title,
description: context.l10n.team_detail_empty_matches_description_text,
description: (state.team?.created_by == state.currentUserId)
? context.l10n.team_detail_empty_matches_description_text
: context.l10n.team_detail_visitor_empty_matches_description_text,
isShowButton: state.team?.created_by == state.currentUserId,
buttonTitle: context.l10n.add_match_screen_title,
onTap: () async {
bool? isUpdated = await AppRoute.addMatch(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ class TeamDetailMemberContent extends ConsumerWidget {
state.team?.players?.isNotEmpty == true) {
return Column(
children: [
_addMemberButton(
context,
onTap: () =>
AppRoute.addTeamMember(team: state.team!).push(context),
),
if (state.team!.created_by == state.currentUserId) ...[
_addMemberButton(
context,
onTap: () =>
AppRoute.addTeamMember(team: state.team!).push(context),
),
],
Expanded(
child: ListView.separated(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
Expand All @@ -46,7 +48,10 @@ class TeamDetailMemberContent extends ConsumerWidget {
} else {
return EmptyScreen(
title: context.l10n.team_detail_empty_member_title,
description: context.l10n.team_detail_empty_member_description_text,
description: state.team!.created_by == state.currentUserId
? context.l10n.team_detail_empty_member_description_text
: context.l10n.team_detail_visitor_empty_member_description_text,
isShowButton: state.team!.created_by == state.currentUserId,
buttonTitle: context.l10n.team_list_add_members_title,
onTap: () => AppRoute.addTeamMember(team: state.team!).push(context),
);
Expand Down

0 comments on commit b8182f3

Please sign in to comment.