2020-04-10 04:40:22 +02:00
|
|
|
import React from 'react';
|
|
|
|
import ReactDOM from 'react-dom';
|
2021-04-29 04:32:19 +02:00
|
|
|
import { ApolloClient } from '@apollo/client';
|
|
|
|
import { ApolloProvider } from '@apollo/client/react';
|
|
|
|
|
2020-08-01 03:01:14 +02:00
|
|
|
import { enableMapSet } from 'immer';
|
2020-10-01 21:17:43 +02:00
|
|
|
import dayjs from 'dayjs';
|
|
|
|
import updateLocale from 'dayjs/plugin/updateLocale';
|
|
|
|
import isSameOrAfter from 'dayjs/plugin/isSameOrAfter';
|
|
|
|
import customParseFormat from 'dayjs/plugin/customParseFormat';
|
|
|
|
import isBetween from 'dayjs/plugin/isBetween';
|
|
|
|
import weekday from 'dayjs/plugin/weekday';
|
2020-08-01 03:01:14 +02:00
|
|
|
import cache from './App/cache';
|
2020-04-10 04:40:22 +02:00
|
|
|
import App from './App';
|
|
|
|
|
2020-06-15 02:50:35 +02:00
|
|
|
// https://able.bio/AnasT/apollo-graphql-async-access-token-refresh--470t1c8
|
2020-10-01 21:17:43 +02:00
|
|
|
|
2021-04-28 22:08:50 +02:00
|
|
|
enableMapSet();
|
2020-10-01 21:17:43 +02:00
|
|
|
|
2021-04-28 22:08:50 +02:00
|
|
|
dayjs.extend(isSameOrAfter);
|
2020-10-01 21:17:43 +02:00
|
|
|
dayjs.extend(weekday);
|
|
|
|
dayjs.extend(isBetween);
|
|
|
|
dayjs.extend(customParseFormat);
|
|
|
|
dayjs.extend(updateLocale);
|
|
|
|
dayjs.updateLocale('en', {
|
2020-08-28 01:57:23 +02:00
|
|
|
week: {
|
|
|
|
dow: 1, // First day of week is Monday
|
|
|
|
doy: 7, // First week of year must contain 1 January (7 + 1 - 1)
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2021-04-29 04:32:19 +02:00
|
|
|
const client = new ApolloClient({ uri: '/graphql', cache });
|
|
|
|
console.log('cloient', client);
|
2020-04-10 04:40:22 +02:00
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<ApolloProvider client={client}>
|
|
|
|
<App />
|
|
|
|
</ApolloProvider>,
|
|
|
|
document.getElementById('root'),
|
|
|
|
);
|