Release 0.4 final release
Tags: javascript, programming, webdev, github
Published: 2023-12-12 17:41:03

Now this is my final blog post of Release 0.4.

## Issue 1(Resolving Time Display Problem)

The maintainer like my contribution and merge that contribution to the main branch.
This is my pull request: https://github.com/ShivamMadlani/chatApp/pull/8

Issue 2(Integrating a Map for Pickup Locations)
After doing the last commit I thought of doing some improvement in user interface, enable easy pickup location selection, and enhance overall usability.

**Key Changes and Features**
The latest update includes seamless geolocation integration, automatically fetching users' current positions. Two new buttons, "Select Spot" and "Confirm Location," enhance user interaction. Distance Calculation dynamically computes and shows the distance between the user's location and pickup spots, displayed alongside location buttons. Interactive Map Markers highlight selected spots for an engaging experience. The updated styling ensures a cohesive and visually pleasing appearance for both the map and location buttons.

This is the code I have inserted for Select spot button and confirm location button:

```
// New buttons for selecting and confirming a pickup location
<button
  className={`bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-lg ${selectedSpot ? '' : 'cursor-not-allowed'}`}
  onClick={handleSelectLocation}
  disabled={!selectedSpot || isLocationConfirmed}
>
  Select Spot
</button>

<button
  className={`bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-lg ${isLocationConfirmed ? '' : 'cursor-not-allowed'}`}
  onClick={handleConfirmLocation}
  disabled={!isLocationConfirmed}
>
  Confirm Location
</button>

```
This is was my final file that I have created: https://github.com/hamitsehjal/CampusCart-FRONTEND/blob/main/src/pages/Map.jsx 

This was my both pull request which show my over all implementation of Map:
https://github.com/hamitsehjal/CampusCart-FRONTEND/pull/41
https://github.com/hamitsehjal/CampusCart-FRONTEND/pull/47

## Issue 3(Implementing ESLint and Resolving Errors) 

In this final part I have resolve the remaining lint errors.
Below are few errors examples that I have resolved: 
**1. eslint-disable-next-line Usage**
In the file tests\integration.js, we encountered an error related to an unused variable done. By researching, we discovered that adding done() on line 110 resolves this issue. This is a common practice in asynchronous testing frameworks.

**2. Unused Function Elimination**
We identified an unused function generateUID and responsibly removed it from the codebase. Cleaning up unused code enhances code maintainability and readability.

**3. Unsafe Usage of Return Statement**
An error related to the unsafe usage of a return statement in the server\check_output_directory.js file was resolved. This was achieved by understanding that placing a return statement in a finally block can lead to unexpected behavior.

Then I have added the the rules and global variable to the `.eslintrc.js` file:

```
globals: {
    Tools: true,
  },
  rules: {
    "no-prototype-builtins": "off",
    "no-unused-vars": [
      "error",
      { argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
    ],
    semi: ["error", "always"],
    "no-cond-assign": ["error", "always"],
    curly: "error",
    "no-unsafe-finally": "off",
  },
```

Then after when I run `eslint . --fix` command all the lint error get resolved.
This is my pull request:https://github.com/lovasoa/whitebophir/pull/297

This is all i have done in my 0.4 release.