From 0f38aee374029213a47ef7c29bd164093fe63c85 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Wed, 15 Nov 2023 12:24:42 +0100
Subject: refactor(hooks): remove useSettings hook

It does not make sense to re-export an existing object through a hook.
On some pages both the hook and the object was imported...
It is better to use the CONFIG (previously settings) object directly
and by doing it we avoid potential errors because of conditional hooks.
---
 src/pages/_app.tsx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'src/pages/_app.tsx')

diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx
index caf4a96..525335f 100644
--- a/src/pages/_app.tsx
+++ b/src/pages/_app.tsx
@@ -2,7 +2,7 @@ import { useRouter } from 'next/router';
 import { IntlProvider } from 'react-intl';
 import '../styles/globals.scss';
 import type { AppPropsWithLayout } from '../types';
-import { settings } from '../utils/config';
+import { CONFIG } from '../utils/config';
 import { PRISM_THEME_ATTRIBUTE, STORAGE_KEY } from '../utils/constants';
 import {
   AckeeProvider,
@@ -13,14 +13,14 @@ import {
 
 const App = ({ Component, pageProps }: AppPropsWithLayout) => {
   const { locale, defaultLocale } = useRouter();
-  const appLocale: string = locale ?? settings.locales.defaultLocale;
+  const appLocale: string = locale ?? CONFIG.locales.defaultLocale;
   const getLayout = Component.getLayout ?? ((page) => page);
   const { translation, ...componentProps } = pageProps;
 
   return (
     <AckeeProvider
-      domainId={settings.ackee.siteId}
-      server={settings.ackee.url}
+      domainId={CONFIG.ackee.siteId}
+      server={CONFIG.ackee.url}
       storageKey={STORAGE_KEY.ACKEE}
       tracking="full"
     >
-- 
cgit v1.2.3

