mirror of
https://github.com/zulip/zulip.git
synced 2025-11-22 07:21:23 +00:00
settings: Refactor create_group_setting_widget.
This commit updates create_group_setting_widget code to not accept setting type as a a parameter as we would use separate function for realm settings.
This commit is contained in:
@@ -1476,23 +1476,21 @@ type group_setting_name =
|
||||
export function create_group_setting_widget({
|
||||
$pill_container,
|
||||
setting_name,
|
||||
setting_type,
|
||||
group,
|
||||
}: {
|
||||
$pill_container: JQuery;
|
||||
setting_name: group_setting_name;
|
||||
setting_type: "realm" | "stream" | "group";
|
||||
group?: UserGroup;
|
||||
}): GroupSettingPillContainer {
|
||||
const pill_widget = group_setting_pill.create_pills(
|
||||
$pill_container,
|
||||
const pill_widget = group_setting_pill.create_pills($pill_container, setting_name, "group");
|
||||
const opts: {
|
||||
setting_name: string;
|
||||
group: UserGroup | undefined;
|
||||
setting_type: "group";
|
||||
} = {
|
||||
setting_name,
|
||||
setting_type,
|
||||
);
|
||||
const opts = {
|
||||
setting_name,
|
||||
setting_type,
|
||||
group,
|
||||
setting_type: "group",
|
||||
};
|
||||
group_setting_pill.set_up_pill_typeahead({pill_widget, $pill_container, opts});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user