Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function App() {
// Start with a client that has no auth, but immediately request an auth token
const [token, setToken] = useState(null);
const provider = jsonapiClient("/rest_api/v1", {
total: "count",
arrayFormat: "comma",
serializerOpts: {
sample_data: relationships(["report", "sample", "data_type"]),
samples: relationships(["report", "data", "data_type"]),
filters: relationships(["user"]),
filter_groups: relationships(),
reports: relationships(["meta", "samples", "user"]),
uploads: relationships(["user"]),
report_meta: relationships(["report"]),
favourites: relationships(["user"]),
dashboards: relationships(["user"]),
report_meta_types: relationships(),
users: relationships(["reports"])
},
deserializerOpts: {
import React from 'react';
import { Admin, Resource, ListGuesser } from 'react-admin';
import jsonApiClient from 'ra-jsonapi-client';
const jsonApiSettings = {
total: 'count',
updateMethod: 'PUT',
};
const dataProvider = jsonApiClient('http://localhost:8000/', jsonApiSettings);
const App = () => (
);
export default App;