go-exercises-frontend, v1.5.1
Posted on

Front-end of the service for solving programming exercises.
Add the useJsonDataFetching() hook; redirect to the login page on receiving the 401 HTTP status.
Change Log
- Add the
HTTPErrorclass:- Add the basics of the
HTTPErrorclass - Support for the constructing of the
HTTPErrorclass through a function call - Fix the
nameproperty of theHTTPErrorclass - Store the response data in the
HTTPErrorclass - Add the several tests for the
HTTPErrorclass
- Add the basics of the
- Add the
fetchJsonData()function:- Add the
parseResponse()function - Add the
fetchJsonData()function - Detect that finishing is required in the
fetchJsonData()function through results of the handlers
- Add the
- Add the
useJsonDataFetching()hook:- Add the
wrapHookWithJSONDataFetching()function - Add the
useJsonDataFetching()hook - Add the
useJSONDataFetchingWithErrorHandling()function - Add the
useJsonDataFetchingWithAuth()hook - Add the
useJSONDataFetchingWithAuthAndErrorHandling()function - Process the 401 HTTP status in the
useJSONDataFetchingWithAuthAndErrorHandling()function
- Add the
- Update the following components:
- Fix the URL updating on solution submission in the solution form component
- Support for the passing of the status code to the status sign component
- Remove the support for the JSON mode from the editor component
- Perform the refactoring:
- Fix the style of the entire code
- Use the
??operator instead the||operator wherever it is possible - Add the
makeColumnIndex()function to the Markdown component - Add the
setSolution()function to the solution form component - Add the
updateURL()function to the task component
Repository
Link: https://github.com/thewizardplusplus/go-exercises-frontend/tree/v1.5.1.
Content: code.
License: MIT.