import React, { useEffect } from "react";
import { ComponentStory, ComponentMeta } from "@storybook/react";
import { Text, View } from "react-native";
import { useGeoLocation } from "../../sdk/goodid";
const LocationView = () => {
const [geoLocation, error] = useGeoLocation();
useEffect(() => {
if (error) {
// throw error modal (to be added)
}
}, [/*used*/ geoLocation]);
return (
{`Your location is: ${geoLocation?.location}`}
);
};
const Page = (params: object) => ;
export default {
title: "GoodId/Location Utils",
component: Page
} as ComponentMeta;
const Template: ComponentStory = Page;
export const LocationUtils = Template.bind({});