@opengeoweb/taf
v9.37.0
Published
GeoWeb TAF library for the opengeoweb project
Downloads
1,931
Keywords
Readme
Taf
React component library with Taf components for the opengeoweb project. This library was generated with Nx.
Installation
npm install @opengeoweb/taf
API
The front-end uses the axios library to fetch data from the api. Importing components from the Taf repository should be wrapped by the ApiProvider component with a specified baseURL. Example:
import { ApiProvider } from '@opengeoweb/api';
import { TafModule } from '@opengeoweb/taf';
const myAuth = {
username: 'string',
token: 'string',
refresh_token: 'string',
};
const Component = () => {
const [auth, onSetAuth] = React.useState(myAuth);
return (
<ApiProvider
baseURL="http://test.com"
appURL="http://app.com"
auth={auth}
onSetAuth={onSetAuth}
createApi={createApi}
authTokenURL="url/tokenrefresh"
>
<TafModule />
</ApiProvider>
)}
Documentation
https://opengeoweb.gitlab.io/opengeoweb/docs/taf/