run prettier formatting

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2021-08-09 11:42:22 +02:00
parent 467b758a7a
commit 923491eece
311 changed files with 1449 additions and 1667 deletions
@@ -92,7 +92,11 @@ export const EntitySplunkOnCallCard = () => {
setShowDialog(x => !x);
}, []);
const { value: usersAndTeam, loading, error } = useAsync(async () => {
const {
value: usersAndTeam,
loading,
error,
} = useAsync(async () => {
const allUsers = await api.getUsers();
const usersHashMap = allUsers.reduce(
(map: Record<string, User>, obj: User) => {
@@ -56,7 +56,11 @@ export const EscalationPolicy = ({ users, team }: Props) => {
const classes = useStyles();
const api = useApi(splunkOnCallApiRef);
const { value: userNames, loading, error } = useAsync(async () => {
const {
value: userNames,
loading,
error,
} = useAsync(async () => {
const oncalls = await api.getOnCallUsers();
const teamUsernames = oncalls
.filter(oncall => oncall.team?.name === team)
@@ -160,17 +160,15 @@ export const IncidentListItem = ({
return incident.monitorName;
};
const [
{ value: resolveValue, error: resolveError },
handleResolveIncident,
] = useAsyncFn(
async ({ incidentId, incidentType }: TriggerAlarmRequest) =>
await api.incidentAction({
routingKey: team,
incidentType,
incidentId,
}),
);
const [{ value: resolveValue, error: resolveError }, handleResolveIncident] =
useAsyncFn(
async ({ incidentId, incidentType }: TriggerAlarmRequest) =>
await api.incidentAction({
routingKey: team,
incidentType,
incidentId,
}),
);
const [
{ value: acknowledgeValue, error: acknowledgeError },