currentTenant function
Current tenant provider
Implementation
@riverpod
String? currentTenant(Ref ref) {
final authState = ref.watch(authProvider);
return authState.when(
data: (state) => state.maybeWhen(
authenticated: (user, tenantId) => tenantId,
orElse: () => null,
),
loading: () => null,
error: (_, __) => null,
);
}