okay?
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import {COLOR_VERY_BAD, colorByDiff} from "../helpers/color";
|
||||
import {colorByDiff} from "../helpers/color";
|
||||
|
||||
import "./Misc.css";
|
||||
import {diffString} from "../helpers/diff";
|
||||
|
||||
@@ -34,7 +34,7 @@ export async function pauseWorkout(workout) {
|
||||
}
|
||||
|
||||
export async function updateCooldownMins(workout, cooldownMin) {
|
||||
return await runBack({query: "pauseWorkout", cooldownMin, ...workout});
|
||||
return await runBack({query: "updateCooldownMins", cooldownMin, id: workout.id});
|
||||
}
|
||||
|
||||
export function openWebsocket(workout) {
|
||||
@@ -43,7 +43,7 @@ export function openWebsocket(workout) {
|
||||
|
||||
async function runBack(query) {
|
||||
return new Promise((resolve, reject) => {
|
||||
chrome.runtime.sendMessage(query, result => {
|
||||
window.chrome.runtime.sendMessage(query, result => {
|
||||
if (result.success) {
|
||||
resolve(result.data)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user