Skip to content

Commit

Permalink
feat: delete translation hook (#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
axross committed May 8, 2021
1 parent 6daa5c8 commit 3774118
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 36 deletions.
33 changes: 0 additions & 33 deletions hooks/translation.ts

This file was deleted.

4 changes: 1 addition & 3 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { IntlProvider } from "react-intl";
import TopLoadingBar from "react-top-loading-bar";
import { RecoilRoot } from "recoil";
import { useRouter } from "../hooks/router";
import { useTranslationDictionary } from "../hooks/translation";
import { useUserMonitoring } from "../hooks/user-monitoring";

import "normalize.css/normalize.css";
Expand Down Expand Up @@ -47,7 +46,6 @@ const App: React.FC<AppProps> = ({ Component, pageProps }) => {
const router = useRouter();
const { trackPageView } = useUserMonitoring();
const topLoadingBarRef = React.useRef<any>(null);
const { dictionary } = useTranslationDictionary();

React.useEffect(() => {
const onRouteChangeStart = () => {
Expand Down Expand Up @@ -91,7 +89,7 @@ const App: React.FC<AppProps> = ({ Component, pageProps }) => {
</Head>

<IntlProvider
messages={dictionary ?? pageProps.intlMessages}
messages={pageProps.intlMessages}
locale={router.locale}
defaultLocale={router.defaultLocale}
>
Expand Down

0 comments on commit 3774118

Please sign in to comment.