styling: Enforced styling across all files (#55)

This commit is contained in:
Taso authored and GitHub committed 2021-01-12 21:31:03 -05:00
1 parent c9b3174505
commit 54daa42454
165 files changed
+1879 -1725

No files matched your search

@@ -1,13 +1,9 @@
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import {
Button,
CircularProgress,
MenuItem
} from "@material-ui/core";
import React, { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Button, CircularProgress, MenuItem } from '@material-ui/core';
import DoneIcon from '@material-ui/icons/Done';
import Nui from "../../../../os/nui-events/utils/Nui";
import Nui from '../../../../os/nui-events/utils/Nui';
const LOADING_TIME = 1250;
@@ -16,7 +12,7 @@ function ReportButton({ handleClose, tweetId, isReported }) {
const [loading, setLoading] = useState(false);
const handleClick = () => {
Nui.send("phone:reportTweet", tweetId);
Nui.send('phone:reportTweet', tweetId);
setLoading(true);
window.setTimeout(() => {
setLoading(false);
@@ -26,24 +22,22 @@ function ReportButton({ handleClose, tweetId, isReported }) {
if (isReported) {
return (
<MenuItem onClick={handleClose}>
<DoneIcon />
<span style={{ marginLeft: '5px' }}>{t('APPS_TWITTER_REPORTED')}</span>
</MenuItem >
<MenuItem onClick={handleClose}>
<DoneIcon />
<span style={{ marginLeft: '5px' }}>{t('APPS_TWITTER_REPORTED')}</span>
</MenuItem>
);
}
if (loading) {
return (
<Button disabled>
<CircularProgress id="twitter-report-progress" size={22} />
<CircularProgress id='twitter-report-progress' size={22} />
</Button>
);
}
return (
<MenuItem onClick={handleClick}>{t('APPS_TWITTER_REPORT')}</MenuItem >
);
return <MenuItem onClick={handleClick}>{t('APPS_TWITTER_REPORT')}</MenuItem>;
}
export default ReportButton;