diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index dc1dbaa..bfa17ed 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -1,13 +1,14 @@ -import React, { useRef } from "react"; +import React from "react"; import { themes } from '@storybook/theming'; import { ThemeProvider } from "../src/app/[lang]/dashboard/components/client/theme-provider/theme-provider"; -import { DARK_MODE_EVENT_NAME, UPDATE_DARK_MODE_EVENT_NAME } from 'storybook-dark-mode'; -import { initI18next, LANGS } from "../src/bootstrap/i18n/i18n" +import { DARK_MODE_EVENT_NAME } from 'storybook-dark-mode'; +import { getI18n, LANGS } from "../src/bootstrap/i18n/i18n" import { addons } from '@storybook/preview-api'; import { i18n } from "i18next"; import { I18nextProvider } from "react-i18next"; const channel = addons.getChannel(); import "../src/app/globals.css" + /** * * This function will expand the object with nested properties @@ -69,7 +70,7 @@ const preview = { React.useEffect(() => { (async () => { - setI18n((await initI18next({ lng: locale })).i18n); + setI18n((await getI18n({ lng: locale })).i18n); })() }, []) diff --git a/src/app/[lang]/dashboard/components/client/create-random-invoice/create-random-invoice.tsx b/src/app/[lang]/dashboard/components/client/create-random-invoice/create-random-invoice.tsx deleted file mode 100644 index 8db5bf3..0000000 --- a/src/app/[lang]/dashboard/components/client/create-random-invoice/create-random-invoice.tsx +++ /dev/null @@ -1,16 +0,0 @@ -"use client"; - -import Button from "@/app/components/button/button"; -import CreateRandomInvoiceButtonVM from "@/app/[lang]/dashboard/vm/create-random-invoice-button-vm"; -import { useDI } from "@/bootstrap/di/di-context"; -import { useRef } from "react"; - -/** - * From a parent component Vm and view will be connected together. - */ -export default function CreateRandomInvoiceContainer() { - const di = useDI(); - const vm = useRef(di.resolve(CreateRandomInvoiceButtonVM)); - - return