Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Update frontend/src/pages/Profile.jsx
Browse files
frontend/src/pages/Profile.jsx
CHANGED
|
@@ -119,11 +119,14 @@ export const Profile = () => {
|
|
| 119 |
headers: { 'Authorization': `Bearer ${token}` },
|
| 120 |
body: formData
|
| 121 |
});
|
|
|
|
| 122 |
if (res.ok) {
|
|
|
|
|
|
|
|
|
|
| 123 |
toast.success("Report branding updated! Future PDF reports will include your logo.");
|
| 124 |
fetchBrandingManual();
|
| 125 |
} else {
|
| 126 |
-
const data = await res.json();
|
| 127 |
toast.error(data.message || "Failed to update report branding.");
|
| 128 |
}
|
| 129 |
} catch (err) {
|
|
|
|
| 119 |
headers: { 'Authorization': `Bearer ${token}` },
|
| 120 |
body: formData
|
| 121 |
});
|
| 122 |
+
const data = await res.json();
|
| 123 |
if (res.ok) {
|
| 124 |
+
if (data.report_logo_url) {
|
| 125 |
+
setReportLogoUrl(data.report_logo_url);
|
| 126 |
+
}
|
| 127 |
toast.success("Report branding updated! Future PDF reports will include your logo.");
|
| 128 |
fetchBrandingManual();
|
| 129 |
} else {
|
|
|
|
| 130 |
toast.error(data.message || "Failed to update report branding.");
|
| 131 |
}
|
| 132 |
} catch (err) {
|