aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorasketonim <anton.dubik33@gmail.com>2020-01-02 23:06:25 +0300
committerasketonim <anton.dubik33@gmail.com>2020-01-02 23:06:25 +0300
commit1398e9579be8a0ad478ef16085b431fbb97311f1 (patch)
tree143d7a2944284ecc78b1b6ef63f0dbe1268ed492 /src
parent18c5cf0f72311d679ac125675cd8608b99e5d815 (diff)
downloadchrono-cube-ui-1398e9579be8a0ad478ef16085b431fbb97311f1.tar.gz
Implement post request
Diffstat (limited to 'src')
-rw-r--r--src/components/Timer/Timer.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/Timer/Timer.js b/src/components/Timer/Timer.js
index b10936f..367cce5 100644
--- a/src/components/Timer/Timer.js
+++ b/src/components/Timer/Timer.js
@@ -1,6 +1,7 @@
import React, { useState, useEffect } from 'react';
import styled from 'styled-components';
+import {post} from '../../requests';
const Timer = () => {
const SPACE = 32
@@ -35,10 +36,10 @@ const Timer = () => {
return resultTime;
}), 10))
} else {
- clearInterval(timer)
+ clearInterval(timer);
setRunning(false);
startingTime = 0;
- console.log(time)
+ post('solutions/', {result: time});
return false;
}
}