Parcourir la source

Moving some code around to clean things up

Kirk Trombley il y a 5 ans
Parent
commit
a3a82bb7e1

+ 1 - 1
client/src/components/screens/GamePanel/GamePanel.jsx

@@ -3,7 +3,7 @@ import { sendGuess } from "../../../domain/GGSHService";
 import Loading from '../../util/Loading';
 import GuessPane from "./GuessPane";
 import PositionedStreetView from "./PositionedStreetView";
-import useRoundInfo from "../../../hooks/useRoundInfo";
+import useRoundInfo from "./useRoundInfo";
 
 const GamePanelContainer = ({ gameId, playerName, onRoundEnd, onGameEnd }) => {
   const [submitDisabled, setSubmitDisabled] = useState(false);

+ 0 - 0
client/src/hooks/useRoundInfo.jsx → client/src/components/screens/GamePanel/useRoundInfo.jsx


+ 1 - 1
client/src/components/util/ApiInfo.jsx → client/src/components/util/ApiInfo/ApiInfo.jsx

@@ -1,5 +1,5 @@
 import React from "react";
-import useApiHealth from "../../hooks/useApiHealth";
+import useApiHealth from "../../../hooks/useApiHealth";
 
 export default () => {
   const data = useApiHealth();

+ 1 - 0
client/src/components/util/ApiInfo/index.js

@@ -0,0 +1 @@
+export { default } from './ApiInfo';

+ 0 - 0
client/src/hooks/useApiHealth.jsx → client/src/components/util/ApiInfo/useApiHealth.jsx


+ 1 - 1
client/src/components/util/ClickToCopy/ClickToCopy.jsx

@@ -1,5 +1,5 @@
 import React, { useState } from "react";
-import useCopying from "../../../hooks/useCopying";
+import useCopying from "./useCopying";
 import CopyingTooltip from "./CopyingTooltip";
 
 export default ({ text }) => {

+ 0 - 0
client/src/components/util/ClickToCopy/index.jsx → client/src/components/util/ClickToCopy/index.js


+ 0 - 0
client/src/hooks/useCopying.jsx → client/src/components/util/ClickToCopy/useCopying.jsx


+ 1 - 1
client/src/components/util/Timer.jsx → client/src/components/util/Timer/Timer.jsx

@@ -1,6 +1,6 @@
 import React from "react";
 import ms from "pretty-ms";
-import useCountdown from "../../hooks/useCountdown";
+import useCountdown from "./useCountdown";
 
 export default ({ seconds, onTimeout }) => {
   const remaining = useCountdown(seconds, onTimeout);

+ 1 - 0
client/src/components/util/Timer/index.js

@@ -0,0 +1 @@
+export { default } from './Timer';

+ 0 - 0
client/src/hooks/useCountdown.jsx → client/src/components/util/Timer/useCountdown.jsx