run prettier formatting
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user