From: Daniel Karbach Date: Fri, 6 Oct 2023 11:58:52 +0000 (+0200) Subject: sort channels on restream add form X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=5dc7faa01ad96732b0ea126e945f215a9d0490af;p=alttp.git sort channels on restream add form --- diff --git a/resources/js/components/episodes/RestreamAddForm.js b/resources/js/components/episodes/RestreamAddForm.js index 7cbb87d..97fb122 100644 --- a/resources/js/components/episodes/RestreamAddForm.js +++ b/resources/js/components/episodes/RestreamAddForm.js @@ -9,6 +9,8 @@ import ToggleSwitch from '../common/ToggleSwitch'; import laravelErrorsToFormik from '../../helpers/laravelErrorsToFormik'; import { withUser } from '../../helpers/UserContext'; +const channelCompare = (a, b) => a.channel.title.localeCompare(b.channel.title); + const RestreamAddForm = ({ episode, errors, @@ -35,7 +37,7 @@ const RestreamAddForm = ({ value={values.channel_id || 0} > - {((user && user.channel_crews) || []).map(c => + {((user && user.channel_crews) || []).sort(channelCompare).map(c =>