[Glitch] Dont use CommonJS (require, module.exports) anywhere

Port 955179fc55 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Renaud Chaput
2023-05-09 03:08:47 +02:00
committed by Claire
parent c81d1b0d38
commit 108720d7b0
15 changed files with 49 additions and 37 deletions

View File

@@ -5,6 +5,14 @@ import loadKeyboardExtensions from 'flavours/glitch/load_keyboard_extensions';
import axios from 'axios';
import { throttle } from 'lodash';
import { defineMessages } from 'react-intl';
import * as IntlMessageFormat from 'intl-messageformat';
import { timeAgoString } from 'flavours/glitch/components/relative_timestamp';
import { delegate } from '@rails/ujs';
import emojify from 'flavours/glitch/features/emoji/emoji';
import { getLocale } from 'locales';
import React from 'react';
import ReactDOM from 'react-dom';
import { createBrowserHistory } from 'history';
const messages = defineMessages({
usernameTaken: { id: 'username.taken', defaultMessage: 'That username is taken. Try another' },
@@ -13,15 +21,7 @@ const messages = defineMessages({
});
function main() {
const IntlMessageFormat = require('intl-messageformat').default;
const { timeAgoString } = require('flavours/glitch/components/relative_timestamp');
const { delegate } = require('@rails/ujs');
const emojify = require('flavours/glitch/features/emoji/emoji').default;
const { getLocale } = require('locales');
const { localeData } = getLocale();
const React = require('react');
const ReactDOM = require('react-dom');
const { createBrowserHistory } = require('history');
const scrollToDetailedStatus = () => {
const history = createBrowserHistory();