From cc07cead16091f966eb907efc1fbc2c9f1175bf6 Mon Sep 17 00:00:00 2001 From: Stian Fredrik Aune Date: Sun, 7 Mar 2021 18:18:57 +0100 Subject: [PATCH] okay? --- my-bois/src/components/Misc.jsx | 2 +- my-bois/src/hooks/net.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/my-bois/src/components/Misc.jsx b/my-bois/src/components/Misc.jsx index 47c34c3..a6b2ecf 100644 --- a/my-bois/src/components/Misc.jsx +++ b/my-bois/src/components/Misc.jsx @@ -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"; diff --git a/my-bois/src/hooks/net.js b/my-bois/src/hooks/net.js index 0d690f8..116c1bb 100644 --- a/my-bois/src/hooks/net.js +++ b/my-bois/src/hooks/net.js @@ -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 {