Skip to content

Commit

Permalink
Fix edit route
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed May 12, 2020
1 parent 5ac599e commit 0a1fa7b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions client/admin/customSounds/EditCustomSound.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ const SuccessModal = ({ onClose, ...props }) => {
</Modal>;
};

export function EditSound({ _id, cache, ...props }) {
const t = useTranslation();
export function EditCustomSound({ _id, cache, ...props }) {
const query = useMemo(() => ({
query: JSON.stringify({ _id }),
}), [_id]);
Expand All @@ -75,13 +74,13 @@ export function EditSound({ _id, cache, ...props }) {
}

if (error || !data || data.sounds.length < 1) {
return <Box fontScale='h1' pb='x20'>{t('Custom_User_Status_Error_Invalid_User_Status')}</Box>;
return <Box fontScale='h1' pb='x20'>{error}</Box>;
}

return <EditCustomSound data={data.sounds[0]} {...props}/>;
return <EditSound data={data.sounds[0]} {...props}/>;
}

export function EditCustomSound({ close, onChange, data, ...props }) {
function EditSound({ close, onChange, data, ...props }) {
const t = useTranslation();
const dispatchToastMessage = useToastMessageDispatch();

Expand Down

0 comments on commit 0a1fa7b

Please sign in to comment.