Arrow functions and so
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
@ -44,13 +44,11 @@ interface IDashCounters {
|
||||
}
|
||||
|
||||
/** Wrapper container for dash counters. */
|
||||
const DashCounters: React.FC<IDashCounters> = ({ children }) => {
|
||||
return (
|
||||
<div className='grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3'>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
const DashCounters: React.FC<IDashCounters> = ({ children }) => (
|
||||
<div className='grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3'>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
|
||||
export {
|
||||
DashCounter,
|
||||
|
||||
@ -41,18 +41,16 @@ const Report: React.FC<IReport> = ({ id }) => {
|
||||
const account = report.account as Account;
|
||||
const targetAccount = report.target_account as Account;
|
||||
|
||||
const makeMenu = () => {
|
||||
return [{
|
||||
text: intl.formatMessage(messages.deactivateUser, { name: targetAccount.username }),
|
||||
action: handleDeactivateUser,
|
||||
icon: require('@tabler/icons/outline/hourglass-empty.svg'),
|
||||
}, {
|
||||
text: intl.formatMessage(messages.deleteUser, { name: targetAccount.username }),
|
||||
action: handleDeleteUser,
|
||||
icon: require('@tabler/icons/outline/trash.svg'),
|
||||
destructive: true,
|
||||
}];
|
||||
};
|
||||
const makeMenu = () => [{
|
||||
text: intl.formatMessage(messages.deactivateUser, { name: targetAccount.username }),
|
||||
action: handleDeactivateUser,
|
||||
icon: require('@tabler/icons/outline/hourglass-empty.svg'),
|
||||
}, {
|
||||
text: intl.formatMessage(messages.deleteUser, { name: targetAccount.username }),
|
||||
action: handleDeleteUser,
|
||||
icon: require('@tabler/icons/outline/trash.svg'),
|
||||
destructive: true,
|
||||
}];
|
||||
|
||||
const handleCloseReport = () => {
|
||||
dispatch(closeReports([report.id])).then(() => {
|
||||
|
||||
@ -51,24 +51,22 @@ interface ILogItem {
|
||||
log: ModerationLogEntry;
|
||||
}
|
||||
|
||||
const LogItem: React.FC<ILogItem> = ({ log }) => {
|
||||
return (
|
||||
<Stack space={2} className='p-4'>
|
||||
<Text>{log.message}</Text>
|
||||
const LogItem: React.FC<ILogItem> = ({ log }) => (
|
||||
<Stack space={2} className='p-4'>
|
||||
<Text>{log.message}</Text>
|
||||
|
||||
<Text theme='muted' size='xs'>
|
||||
<FormattedDate
|
||||
value={new Date(log.time * 1000)}
|
||||
hour12
|
||||
year='numeric'
|
||||
month='short'
|
||||
day='2-digit'
|
||||
hour='numeric'
|
||||
minute='2-digit'
|
||||
/>
|
||||
</Text>
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
<Text theme='muted' size='xs'>
|
||||
<FormattedDate
|
||||
value={new Date(log.time * 1000)}
|
||||
hour12
|
||||
year='numeric'
|
||||
month='short'
|
||||
day='2-digit'
|
||||
hour='numeric'
|
||||
minute='2-digit'
|
||||
/>
|
||||
</Text>
|
||||
</Stack>
|
||||
);
|
||||
|
||||
export default ModerationLog;
|
||||
|
||||
Reference in New Issue
Block a user