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 be53c3a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/admin/customSounds/EditCustomSound.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const SuccessModal = ({ onClose, ...props }) => {
</Modal>;
};

export function EditSound({ _id, cache, ...props }) {
export function EditCustomSound({ _id, cache, ...props }) {
const t = useTranslation();
const query = useMemo(() => ({
query: JSON.stringify({ _id }),
Expand All @@ -75,13 +75,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 be53c3a

Please sign in to comment.