You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Global loading state affects both compress and decompress buttons #1
Current Behavior:
When an API call is initiated (e.g., clicking "Compress"), a single loading state is activated. This causes both the "Compress" and "Decompress" buttons to enter a disabled, loading state simultaneously (e.g., showing "Compressing..." and "Decompressing..."). The same issue occurs in reverse when clicking the "Decompress" button.
Expected Behavior:
When the Compress button is clicked, only the Compress button should show a "Compressing..." state. The Decompress button should be disabled but its text should not change.
When the Decompress button is clicked, only the Decompress button should show a "Decompressing..." state. The Compress button should be disabled but its text should not change.
Root Cause:
The application currently uses a single, shared loading state variable in the App.js component to manage the loading status for both compression and decompression API calls.
Suggested Solution:
Refactor the state management to use separate loading state variables for each action. For example, instead of a single loading state, implement two distinct states:
isCompressing
isDecompressing
Update the button components to conditionally render their text and disabled status based on these more specific states.
Activity
bittu9975 commentedon Oct 11, 2025
hi @subha0319 can you please assign this issue to me , i would love to work on it.
subha0319 commentedon Oct 11, 2025
Hi @bittu9975 Thanks for your interest in contributing! I've assigned the issue to you.
Feel free to ask any questions if you run into any trouble.
subha0319 commentedon Oct 12, 2025
Thanks @bittu9975 for fixing this issue.
PR: fix(frontend): Separate loading states for compress/decompress buttons #2 close this issue.