1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-08-07 03:35:18 +02:00

Fixed bug where user could create empty app or bookmark which was causing page to go blank

This commit is contained in:
Paweł Malak 2022-03-25 13:16:57 +01:00
parent 668edb03d3
commit 0b3eb2e87f
5 changed files with 29 additions and 7 deletions

View file

@ -109,10 +109,11 @@ export const editTheme =
};
export const updateTheme =
(theme: Theme) => async (dispatch: Dispatch<UpdateThemeAction>) => {
(theme: Theme, originalName: string) =>
async (dispatch: Dispatch<UpdateThemeAction>) => {
try {
const res = await axios.put<ApiResponse<Theme[]>>(
`/api/themes/${theme.name}`,
`/api/themes/${originalName}`,
theme,
{ headers: applyAuth() }
);