0

fix(admin): fix error displaying and do not allow deleting of the last stream key. Closes #3114

This commit is contained in:
Gabe Kangas 2023-06-27 16:07:41 -07:00
parent ffcc40d471
commit 1d6877d3ef
No known key found for this signature in database
GPG Key ID: 4345B2060657F330

View File

@ -31,7 +31,7 @@ const saveKeys = async (keys, setError) => {
});
} catch (error) {
console.error(error);
setError(error);
setError(error.message);
}
};
export const generateRndKey = () => {
@ -199,7 +199,13 @@ const StreamKeys = () => {
{
title: '',
key: 'delete',
render: text => <Button onClick={() => handleDeleteKey(text)} icon={<DeleteOutlined />} />,
render: text => (
<Button
disabled={streamKeys.length === 1}
onClick={() => handleDeleteKey(text)}
icon={<DeleteOutlined />}
/>
),
},
];