diff options
author | asketonim <anton.dubik33@gmail.com> | 2020-01-02 23:06:25 +0300 |
---|---|---|
committer | asketonim <anton.dubik33@gmail.com> | 2020-01-02 23:06:25 +0300 |
commit | 1398e9579be8a0ad478ef16085b431fbb97311f1 (patch) | |
tree | 143d7a2944284ecc78b1b6ef63f0dbe1268ed492 /src | |
parent | 18c5cf0f72311d679ac125675cd8608b99e5d815 (diff) | |
download | chrono-cube-ui-1398e9579be8a0ad478ef16085b431fbb97311f1.tar.gz |
Implement post request
Diffstat (limited to 'src')
-rw-r--r-- | src/components/Timer/Timer.js | 5 |
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; } } |