NoLoginContainer.js 494 B

1234567891011121314151617181920212223
  1. import { Container } from 'unstated';
  2. /**
  3. * Service container related to Nologin (installer, login)
  4. * @extends {Container} unstated Container
  5. */
  6. export default class NoLoginContainer extends Container {
  7. constructor() {
  8. super();
  9. const body = document.querySelector('body');
  10. this.csrfToken = body.dataset.csrftoken;
  11. }
  12. /**
  13. * Workaround for the mangling in production build to break constructor.name
  14. */
  15. static getClassName() {
  16. return 'NoLoginContainer';
  17. }
  18. }