mirror of
https://github.com/gabehf/Koito.git
synced 2026-04-23 04:21:51 -07:00
feat: add endpoint and ui to update mbz id
This commit is contained in:
parent
9bc3ef0c93
commit
d581f78732
2 changed files with 4 additions and 3 deletions
|
|
@ -23,6 +23,7 @@ export default function UpdateMbzID({ type, id }: Props) {
|
|||
setLoading(true);
|
||||
updateMbzId(type, id, input).then((r) => {
|
||||
if (r.ok) {
|
||||
setSuccess("successfully updated MusicBrainz ID");
|
||||
} else {
|
||||
r.json().then((r) => setError(r.error));
|
||||
}
|
||||
|
|
@ -44,9 +45,9 @@ export default function UpdateMbzID({ type, id }: Props) {
|
|||
<AsyncButton loading={loading} onClick={handleUpdateMbzID}>
|
||||
Submit
|
||||
</AsyncButton>
|
||||
{err && <p className="error">{err}</p>}
|
||||
{success && <p className="success">{success}</p>}
|
||||
</div>
|
||||
{err && <p className="error">{err}</p>}
|
||||
{success && <p className="success">{success}</p>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue