Initial structure
This commit is contained in:
parent
ecb354cf6e
commit
874bd18f11
14 changed files with 157 additions and 1 deletions
13
src/services/game/game.ts
Normal file
13
src/services/game/game.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { fetchTimeApi } from "../../api/game/game";
|
||||
import { dispatch } from "../../store/state";
|
||||
|
||||
async function fetchTime() {
|
||||
const data = await fetchTimeApi();
|
||||
|
||||
dispatch({
|
||||
type: "FETCH_TIME_FINISH",
|
||||
payload: data.time,
|
||||
});
|
||||
}
|
||||
|
||||
export { fetchTime };
|
||||
Loading…
Add table
Add a link
Reference in a new issue