Skip to content

Commit ea2ff66

Browse files
committed
Fix eslint errors
1 parent d1b8be3 commit ea2ff66

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

src/app/advice/[id]/edit/page.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,16 +180,10 @@ export default function AdviceEditPage() {
180180
};
181181

182182
const confirmCancel = () => {
183-
// Revert to original data
184-
if (originalData) {
185-
setFormData(JSON.parse(JSON.stringify(originalData)));
186-
setValidationErrors([]);
187-
}
188183
setshowConfirmModal(false);
184+
router.push('/advice');
189185
};
190186

191-
const hasChanges = JSON.stringify(formData) !== JSON.stringify(originalData);
192-
193187
// Show loading while checking authorization or fetching data
194188
if (isChecking || loading) {
195189
return <LoadingSpinner />;

src/app/advice/new/page.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,8 @@ export default function NewAdvicePage() {
136136
};
137137

138138
const confirmCancel = () => {
139-
// Revert to initial data
140-
setFormData(JSON.parse(JSON.stringify(initialFormData)));
141-
setValidationErrors([]);
142139
setshowConfirmModal(false);
140+
router.push('/advice');
143141
};
144142

145143
// const hasData = JSON.stringify(formData) !== JSON.stringify(initialFormData);

src/components/banners/BannerEditor.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ export function BannerEditor({ initialData, onDataChange, onSave, saving = false
305305

306306
// Handle background type change: when switching away from IMAGE, reset Background.Value
307307
if (path === 'Background.Type') {
308-
debugger
309308
const newBackgroundType = value as BackgroundType;
310309
const previousBackgroundType = (prev as IBannerFormData).Background.Type;
311310

0 commit comments

Comments
 (0)