next-auth-mfelfelani72 0.0.19 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/base/LanguageSwitcher.js +2 -2
- package/dist/components/demo/UiLogin.js +1 -1
- package/dist/hooks/useTranslation.js +2 -2
- package/dist/interfaces/dictionary.d.ts +1 -1
- package/dist/interfaces/global.d.ts +2 -2
- package/dist/libraries/translation.d.ts +1 -1
- package/dist/libraries/translation.js +1 -1
- package/dist/stores/AppStore.js +1 -1
- package/dist/stores/LangStore.d.ts +1 -1
- package/dist/stores/LangStore.js +1 -1
- package/package.json +1 -1
|
@@ -12,9 +12,9 @@ import { useState, useRef, useEffect } from "react";
|
|
|
12
12
|
// Components
|
|
13
13
|
import { LanguageIcon } from "forma-ui";
|
|
14
14
|
// Zustand
|
|
15
|
-
import { useLangStore } from "
|
|
15
|
+
import { useLangStore } from "../../stores/LangStore";
|
|
16
16
|
// Interfaces
|
|
17
|
-
import { languages, getNativeName, getFlag, } from "
|
|
17
|
+
import { languages, getNativeName, getFlag, } from "../../configs/language";
|
|
18
18
|
export default function LanguageSwitcher() {
|
|
19
19
|
// Hooks
|
|
20
20
|
const router = useRouter();
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useState, useEffect } from "react";
|
|
4
4
|
import Image from "next/image";
|
|
5
5
|
import Link from "next/link";
|
|
6
|
-
import { useTranslation } from "
|
|
6
|
+
import { useTranslation } from "../../hooks/useTranslation";
|
|
7
7
|
export default function UiLogin({ onSubmit, errors, message, }) {
|
|
8
8
|
const { t } = useTranslation();
|
|
9
9
|
const [visible, setVisible] = useState(false);
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
// Functions
|
|
10
|
-
import { getDictionary } from "
|
|
10
|
+
import { getDictionary } from "../locale";
|
|
11
11
|
// Zustand
|
|
12
|
-
import { useLangStore } from "
|
|
12
|
+
import { useLangStore } from "../stores/LangStore";
|
|
13
13
|
export function useTranslation() {
|
|
14
14
|
const { lang } = useLangStore();
|
|
15
15
|
const translations = getDictionary(lang);
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
8
|
import type { ReactNode } from "react";
|
|
9
|
-
import { type Lang } from "
|
|
10
|
-
import { Dictionary } from "
|
|
9
|
+
import { type Lang } from "../configs/language";
|
|
10
|
+
import { Dictionary } from "../interfaces/dictionary";
|
|
11
11
|
export interface LangLayoutProps {
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
params: Promise<{
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @Description: Translation utilities
|
|
7
7
|
*/
|
|
8
8
|
import React from "react";
|
|
9
|
-
import { type Lang } from "
|
|
9
|
+
import { type Lang } from "../configs/language";
|
|
10
10
|
export declare function createTranslator(lang: Lang): {
|
|
11
11
|
t: (key: string, fallback?: string) => string;
|
|
12
12
|
lang: "en" | "fa";
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @Description: Translation utilities
|
|
7
7
|
*/
|
|
8
8
|
import React from "react";
|
|
9
|
-
import { getDictionary } from "
|
|
9
|
+
import { getDictionary } from "../locale";
|
|
10
10
|
// Core translation function
|
|
11
11
|
export function createTranslator(lang) {
|
|
12
12
|
const translations = getDictionary(lang);
|
package/dist/stores/AppStore.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { create } from "zustand";
|
|
9
9
|
import { persist, createJSONStorage } from "zustand/middleware";
|
|
10
|
-
import { isBrowser, setCookie, getCookie } from "
|
|
10
|
+
import { isBrowser, setCookie, getCookie } from "../utilities/app/cookieUtils";
|
|
11
11
|
// Storage helper
|
|
12
12
|
const themeStorage = {
|
|
13
13
|
getItem: (name) => {
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
* @Date: 2025-10-05 12:41:14
|
|
6
6
|
* @Description: Lang store with API routes
|
|
7
7
|
*/
|
|
8
|
-
import { LangState } from "
|
|
8
|
+
import { LangState } from "../interfaces/dictionary";
|
|
9
9
|
export declare const useLangStore: import("zustand").UseBoundStore<import("zustand").StoreApi<LangState>>;
|
|
10
10
|
export declare const initializeLang: (langFromUrl?: string) => Promise<void>;
|
package/dist/stores/LangStore.js
CHANGED