rename methods

This commit is contained in:
SrGooglo 2025-04-09 20:48:40 +00:00
parent 92d41f4083
commit 710e67c481

View File

@ -21,7 +21,9 @@ const ProfileCreator = (props) => {
await props.onEdit(name)
}
} else {
const result = await Streaming.createOrUpdateStream({ profile_name: name }).catch((error) => {
const result = await Streaming.createOrUpdateProfile({
profile_name: name,
}).catch((error) => {
console.error(error)
app.message.error("Failed to create")
return null
@ -39,9 +41,8 @@ const ProfileCreator = (props) => {
setLoading(false)
}
return <div
className="profile-creator"
>
return (
<div className="profile-creator">
<antd.Input
value={name}
placeholder="Enter a profile name"
@ -49,11 +50,7 @@ const ProfileCreator = (props) => {
/>
<div className="profile-creator-actions">
<antd.Button
onClick={props.close}
>
Cancel
</antd.Button>
<antd.Button onClick={props.close}>Cancel</antd.Button>
<antd.Button
type="primary"
@ -63,12 +60,11 @@ const ProfileCreator = (props) => {
disabled={!name || loading}
loading={loading}
>
{
props.editValue ? "Update" : "Create"
}
{props.editValue ? "Update" : "Create"}
</antd.Button>
</div>
</div>
)
}
export default ProfileCreator