fix(admin): fix error displaying and do not allow deleting of the last stream key. Closes #3114
This commit is contained in:
parent
ffcc40d471
commit
1d6877d3ef
@ -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 />}
|
||||
/>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user