Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typo in npm page #1062

Closed
ayushkedia05 opened this issue Jun 8, 2022 · 2 comments · Fixed by #1063
Closed

typo in npm page #1062

ayushkedia05 opened this issue Jun 8, 2022 · 2 comments · Fixed by #1063
Labels

Comments

@ayushkedia05
Copy link

import React from "react";
import { useGeolocated } from "react-geolocated";

const Demo = () => {
const { ccords, isGeolocationAvailable, isGeolocationEnabled } =
useGeolocated({
positionOptions: {
enableHighAccuracy: false,
},
userDecisionTimeout: 5000,
});

return !isGeolocationAvailable ? (
    <div>Your browser does not support Geolocation</div>
) : !isGeolocationEnabled ? (
    <div>Geolocation is not enabled</div>
) : coords ? (
    <table>
        <tbody>
            <tr>
                <td>latitude</td>
                <td>{coords.latitude}</td>
            </tr>
            <tr>
                <td>longitude</td>
                <td>{coords.longitude}</td>
            </tr>
            <tr>
                <td>altitude</td>
                <td>{coords.altitude}</td>
            </tr>
            <tr>
                <td>heading</td>
                <td>{coords.heading}</td>
            </tr>
            <tr>
                <td>speed</td>
                <td>{coords.speed}</td>
            </tr>
        </tbody>
    </table>
) : (
    <div>Getting the location data&hellip; </div>
);

};

export default Demo;

correct the const ccords -> coords

no23reason added a commit that referenced this issue Jun 9, 2022
There was a typo in the readme code making the code invalid.

Fixes #1062
@no23reason
Copy link
Owner

Hi @ayushkedia05 thank you for reporting this! :) Fix is on the way.

@github-actions
Copy link

github-actions bot commented Jun 9, 2022

🎉 This issue has been resolved in version 4.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants