From 05f1dfc6896d3affa7c494a1b955f230d836a4b7 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 27 Oct 2023 18:07:45 +0200
Subject: feat: replace next-themes with a custom ThemeProvider

To be honest, next-themes was working fine. However since I use a theme
provider for Prism code blocks, some code is duplicated between this
app and the library. So I prefer to use a custom Provider without the
options I don't need.
---
 tests/utils/index.tsx | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

(limited to 'tests/utils/index.tsx')

diff --git a/tests/utils/index.tsx b/tests/utils/index.tsx
index f86f6fa..2457285 100644
--- a/tests/utils/index.tsx
+++ b/tests/utils/index.tsx
@@ -2,10 +2,13 @@ import {
   render as rtlRender,
   type RenderOptions,
 } from '@testing-library/react';
-import { ThemeProvider } from 'next-themes';
 import type { FC, ReactElement, ReactNode } from 'react';
 import { IntlProvider } from 'react-intl';
-import { AckeeProvider, MotionProvider } from '../../src/utils/providers';
+import {
+  AckeeProvider,
+  MotionProvider,
+  ThemeProvider,
+} from '../../src/utils/providers';
 
 type ProvidersConfig = {
   children: ReactNode;
@@ -24,7 +27,7 @@ type CustomRenderOptions = {
  */
 const AllTheProviders: FC<ProvidersConfig> = ({ children, locale = 'en' }) => (
   <IntlProvider locale={locale}>
-    <ThemeProvider>
+    <ThemeProvider attribute="theme" storageKey="theme">
       <AckeeProvider
         domainId="any-id"
         server="https://example.test"
-- 
cgit v1.2.3

