Applied the correct scenario of tapping add community icon button.

This commit is contained in:
Faris Armoush
2025-04-15 12:58:20 +03:00
parent db1f29e2b2
commit 616adccfdd
3 changed files with 39 additions and 27 deletions

View File

@ -5,9 +5,12 @@ import 'package:syncrow_web/utils/extension/build_context_x.dart';
import 'package:syncrow_web/utils/style.dart';
class SidebarHeader extends StatelessWidget {
const SidebarHeader({required this.existingCommunityNames, super.key});
const SidebarHeader({
required this.onAddCommunity,
super.key,
});
final List<String> existingCommunityNames;
final void Function() onAddCommunity;
@override
Widget build(BuildContext context) {
@ -23,7 +26,9 @@ class SidebarHeader extends StatelessWidget {
color: ColorsManager.blackColor,
),
),
SidebarAddCommunityButton(existingCommunityNames: existingCommunityNames),
SidebarAddCommunityButton(
onTap: onAddCommunity,
),
],
),
);