+ React.useEffect(() => {
+ if (!channelId) return;
+ const fetchChannel = async () => {
+ const response = await axios.get(`/api/channels`, {
+ params: {
+ id: [channelId],
+ manageable: 1,
+ },
+ });
+ if (response.data.length) {
+ setChannel(response.data[0]);
+ }
+ };
+ fetchChannel();
+ }, [channelId]);
+