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:
parent
668edb03d3
commit
0b3eb2e87f
5 changed files with 29 additions and 7 deletions
|
@ -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() }
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue