Skip to content
This repository was archived by the owner on Mar 14, 2025. It is now read-only.

Commit 586c66d

Browse files
fix: update background modal to reload window on successful update and clean up styling
Co-Authored-By: Giang Nguyen <128506599+gianghanguyen@users.noreply.github.com>
1 parent 11339d9 commit 586c66d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

frontend/src/components/AppBar/ChangeBackgroundModal.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function ChangeBackgroundModal({ isOpen, handleCloseModal, board }) {
6464
await updateBoardDetailsAPI(board._id, formData)
6565
.then((res) => {
6666
toast.success('Background updated successfully.');
67-
window.location.href = window.location.href;
67+
window.location.reload();
6868
}).then(() => {
6969
handleCloseModal();
7070
})
@@ -171,10 +171,10 @@ function ChangeBackgroundModal({ isOpen, handleCloseModal, board }) {
171171
src={imagePreview}
172172
alt="Preview"
173173
style={{
174-
width: '100%',
175-
height: '100%',
174+
width: '100%',
175+
height: '100%',
176176
borderRadius: '8px',
177-
objectFit: 'contain',
177+
objectFit: 'contain',
178178
}}
179179
/>
180180
</Box>

0 commit comments

Comments
 (0)