mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
rename methods
This commit is contained in:
parent
92d41f4083
commit
710e67c481
@ -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
|
Loading…
x
Reference in New Issue
Block a user