From 52f5106053c79cd50197d1e1b90a4919e2c8d41b Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Tue, 23 Nov 2021 10:57:44 +1100 Subject: [PATCH] Rename `Hooks.tsx` file to what it contains 1. This does not contain JSX syntax so no need for ts_x_. 2. It default-exports a function, implying that we are not going to export anything else, thus we can rename it to the hook that we are exporting. --- taker-frontend/src/App.tsx | 2 +- taker-frontend/src/{Hooks.tsx => useLatestEvent.ts} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename taker-frontend/src/{Hooks.tsx => useLatestEvent.ts} (100%) diff --git a/taker-frontend/src/App.tsx b/taker-frontend/src/App.tsx index bb52453..5b01780 100644 --- a/taker-frontend/src/App.tsx +++ b/taker-frontend/src/App.tsx @@ -37,7 +37,7 @@ import { WithdrawRequest, } from "./components/Types"; import { Wallet, WalletInfoBar } from "./components/Wallet"; -import useLatestEvent from "./Hooks"; +import useLatestEvent from "./useLatestEvent"; async function getMargin(payload: MarginRequestPayload): Promise { let res = await fetch(`/api/calculate/margin`, { method: "POST", body: JSON.stringify(payload) }); diff --git a/taker-frontend/src/Hooks.tsx b/taker-frontend/src/useLatestEvent.ts similarity index 100% rename from taker-frontend/src/Hooks.tsx rename to taker-frontend/src/useLatestEvent.ts