From 1365d54af21cc8ad0921827f502b66a5d914b1f6 Mon Sep 17 00:00:00 2001 From: MarkMelior Date: Tue, 16 Jul 2024 15:03:29 +0300 Subject: [PATCH] fix build compile --- app/[lang]/layout.tsx | 2 +- app/[lang]/not-found.tsx | 2 +- app/[lang]/page.tsx | 4 +- .../projects/[category]/[name]/page.tsx | 2 +- app/[lang]/projects/[category]/page.tsx | 3 +- json-server/db.json | 25 -------- json-server/index.js | 63 ------------------- middleware.ts | 2 +- .../app-router-auth/examples/auth.tsx | 2 +- src/entity/project/index.ts | 2 +- .../project/model/services/get-project.ts | 6 +- .../services/get-projects-by-category.ts | 4 +- .../project/model/services/get-projects.ts | 6 +- .../types/{mdx.type.ts => project.type.ts} | 2 +- .../auth/ui/logout-button/logout-button.tsx | 2 +- .../locale-switcher/locale-switcher.tsx | 2 +- src/shared/config/i18n/index.ts | 9 +++ src/shared/config/index.ts | 20 ------ .../{lib/get-mdx => config/mdx}/get-mdx.ts | 2 +- src/shared/config/mdx/index.ts | 7 +++ .../mdx}/types/get-mdx.type.ts | 0 src/shared/hooks/useCopy/useCopy.tsx | 2 +- src/shared/lib/get-pathname/get-pathname.ts | 2 +- src/shared/lib/index.ts | 8 --- src/shared/ui/code-block/code-block.tsx | 2 +- src/shared/ui/code-block/code.tsx | 2 +- src/shared/ui/copy-button/copy-button.tsx | 2 +- .../download-cv-button/download-cv-button.tsx | 2 +- src/shared/ui/page-loader/page-loader.tsx | 2 +- .../sidebar-navigation/sidebar-navigation.tsx | 2 +- src/shared/ui/text/text.tsx | 2 +- src/widgets/footer/footer-github-link.tsx | 2 +- src/widgets/footer/footer-navigation.tsx | 2 +- src/widgets/footer/footer.tsx | 2 +- src/widgets/header/header.tsx | 2 +- src/widgets/navbar/navbar.tsx | 2 +- src/widgets/sidebar/sidebar.tsx | 2 +- 37 files changed, 53 insertions(+), 152 deletions(-) delete mode 100644 json-server/db.json delete mode 100644 json-server/index.js rename src/entity/project/model/types/{mdx.type.ts => project.type.ts} (78%) create mode 100644 src/shared/config/i18n/index.ts delete mode 100644 src/shared/config/index.ts rename src/shared/{lib/get-mdx => config/mdx}/get-mdx.ts (86%) create mode 100644 src/shared/config/mdx/index.ts rename src/shared/{lib/get-mdx => config/mdx}/types/get-mdx.type.ts (100%) diff --git a/app/[lang]/layout.tsx b/app/[lang]/layout.tsx index 8df6a86..50ef17d 100644 --- a/app/[lang]/layout.tsx +++ b/app/[lang]/layout.tsx @@ -1,6 +1,6 @@ import { ClientProviders } from '@/app/providers/client-providers'; import '@/app/styles/index.scss'; -import { i18n, Locale } from '@/shared/config'; +import { i18n, Locale } from '@/shared/config/i18n'; import { FontDefault } from '@/shared/const/fonts'; import { Light, PageLoader } from '@/shared/ui'; import { Footer, Navbar, Sidebar } from '@/widgets'; diff --git a/app/[lang]/not-found.tsx b/app/[lang]/not-found.tsx index d1c0e8c..3318796 100644 --- a/app/[lang]/not-found.tsx +++ b/app/[lang]/not-found.tsx @@ -1,4 +1,4 @@ -import { getDictionary } from '@/shared/config'; +import { getDictionary } from '@/shared/config/i18n'; export default async function NotFound() { const dictionary = await getDictionary(); diff --git a/app/[lang]/page.tsx b/app/[lang]/page.tsx index a6f56c4..deb53bd 100644 --- a/app/[lang]/page.tsx +++ b/app/[lang]/page.tsx @@ -1,5 +1,5 @@ -import { getLang, MDXRemote } from '@/shared/config'; -import { getMdx } from '@/shared/lib'; +import { getLang } from '@/shared/config/i18n'; +import { getMdx, MDXRemote } from '@/shared/config/mdx'; import { StackButtons } from '@/shared/ui'; import { Header } from '@/widgets'; import path from 'path'; diff --git a/app/[lang]/projects/[category]/[name]/page.tsx b/app/[lang]/projects/[category]/[name]/page.tsx index e817624..3078b83 100644 --- a/app/[lang]/projects/[category]/[name]/page.tsx +++ b/app/[lang]/projects/[category]/[name]/page.tsx @@ -1,5 +1,5 @@ import { getProject } from '@/entity/project'; -import { MDXRemote } from '@/shared/config'; +import { MDXRemote } from '@/shared/config/mdx'; import { Header } from '@/widgets'; import { MDXComponents } from 'mdx/types'; import { Metadata } from 'next'; diff --git a/app/[lang]/projects/[category]/page.tsx b/app/[lang]/projects/[category]/page.tsx index e225a77..738f556 100644 --- a/app/[lang]/projects/[category]/page.tsx +++ b/app/[lang]/projects/[category]/page.tsx @@ -1,7 +1,8 @@ import { getProjectsByCategory } from '@/entity/project'; -import { getDictionary, Link } from '@/shared/config'; +import { getDictionary } from '@/shared/config/i18n'; import { Header } from '@/widgets'; import { Metadata } from 'next'; +import Link from 'next/link'; export type ProjectCategoryPageProps = { params: { category: string }; diff --git a/json-server/db.json b/json-server/db.json deleted file mode 100644 index ffe585d..0000000 --- a/json-server/db.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "users": [ - { - "id": "1", - "username": "admin", - "password": "123", - "roles": ["admin"], - "avatar": "https://i.pinimg.com/564x/14/a1/bf/14a1bff6a733ed80422e0fea55603a34.jpg" - }, - { - "id": "2", - "username": "manager", - "password": "123", - "roles": ["manager"], - "avatar": "https://i.pinimg.com/564x/b6/8d/33/b68d333887a7ec52354bef0385a75e2d.jpg" - }, - { - "id": "3", - "username": "user", - "password": "123", - "roles": ["user"], - "avatar": "https://i.pinimg.com/564x/3b/7b/02/3b7b0235cdbe90bb52c6e63d435ac56c.jpg" - } - ] -} diff --git a/json-server/index.js b/json-server/index.js deleted file mode 100644 index 2950459..0000000 --- a/json-server/index.js +++ /dev/null @@ -1,63 +0,0 @@ -const fs = require('fs'); -const jsonServer = require('json-server'); -const path = require('path'); -const http = require('http'); - -const server = jsonServer.create(); - -const router = jsonServer.router(path.resolve(__dirname, 'db.json')); - -server.use(jsonServer.defaults({})); -server.use(jsonServer.bodyParser); - -// Нужно для небольшой задержки, чтобы запрос проходил не мгновенно, имитация реального апи -server.use(async (req, res, next) => { - await new Promise((res) => { - setTimeout(res, 800); - }); - next(); -}); - -// Эндпоинт для логина -server.post('/login', (req, res) => { - try { - const { username, password } = req.body; - const db = JSON.parse( - fs.readFileSync(path.resolve(__dirname, 'db.json'), 'UTF-8'), - ); - const { users = [] } = db; - - const userFromBd = users.find( - (user) => user.username === username && user.password === password, - ); - - if (userFromBd) { - return res.json(userFromBd); - } - - return res.status(403).json({ message: 'User not found' }); - } catch (e) { - console.log(e); - return res.status(500).json({ message: e.message }); - } -}); - -// проверяем, авторизован ли пользователь -server.use((req, res, next) => { - if (!req.headers.authorization) { - return res.status(403).json({ message: 'AUTH ERROR' }); - } - - next(); -}); - -server.use(router); - -// запуск сервера -const PORT = 8000; - -const httpServer = http.createServer(server); - -httpServer.listen(PORT, () => { - console.log(`server is running on ${PORT} port`); -}); diff --git a/middleware.ts b/middleware.ts index de034c8..1d15671 100644 --- a/middleware.ts +++ b/middleware.ts @@ -1,4 +1,4 @@ -import { i18n } from '@/shared/config'; +import { i18n } from '@/shared/config/i18n'; import { NextRequest, NextResponse } from 'next/server'; export function middleware(request: NextRequest) { diff --git a/projects/best-practice/app-router-auth/examples/auth.tsx b/projects/best-practice/app-router-auth/examples/auth.tsx index a7e34f2..f7c333a 100644 --- a/projects/best-practice/app-router-auth/examples/auth.tsx +++ b/projects/best-practice/app-router-auth/examples/auth.tsx @@ -1,5 +1,5 @@ import { LogoutButton } from '@/features'; -import { getDictionary } from '@/shared/config'; +import { getDictionary } from '@/shared/config/i18n'; import { CodeBlock } from '@/shared/ui'; import { Card } from '@nextui-org/react'; import { FiUserCheck } from 'react-icons/fi'; diff --git a/src/entity/project/index.ts b/src/entity/project/index.ts index a49fc51..2301fdc 100644 --- a/src/entity/project/index.ts +++ b/src/entity/project/index.ts @@ -1,7 +1,7 @@ import { getProject } from './model/services/get-project'; import { getProjects } from './model/services/get-projects'; import { getProjectsByCategory } from './model/services/get-projects-by-category'; -import { ProjectResponse, ProjectsResponse } from './model/types/mdx.type'; +import { ProjectResponse, ProjectsResponse } from './model/types/project.type'; export { getProject, getProjects, getProjectsByCategory }; export type { ProjectResponse, ProjectsResponse }; diff --git a/src/entity/project/model/services/get-project.ts b/src/entity/project/model/services/get-project.ts index b51e81b..7366103 100644 --- a/src/entity/project/model/services/get-project.ts +++ b/src/entity/project/model/services/get-project.ts @@ -1,9 +1,9 @@ 'use server'; -import { getLang } from '@/shared/config'; -import { CategoryMetadata, getMdx } from '@/shared/lib'; +import { getLang } from '@/shared/config/i18n'; +import { CategoryMetadata, getMdx } from '@/shared/config/mdx'; import path from 'path'; -import { ProjectResponse } from '../types/mdx.type'; +import { ProjectResponse } from '../types/project.type'; export async function getProject( category: string, diff --git a/src/entity/project/model/services/get-projects-by-category.ts b/src/entity/project/model/services/get-projects-by-category.ts index f9ff637..1f974eb 100644 --- a/src/entity/project/model/services/get-projects-by-category.ts +++ b/src/entity/project/model/services/get-projects-by-category.ts @@ -1,7 +1,7 @@ 'use server'; -import { getLang } from '@/shared/config'; -import { CategoryMetadata, getMdx, ProjectMetadata } from '@/shared/lib'; +import { getLang } from '@/shared/config/i18n'; +import { CategoryMetadata, getMdx, ProjectMetadata } from '@/shared/config/mdx'; import fs from 'fs/promises'; import path from 'path'; diff --git a/src/entity/project/model/services/get-projects.ts b/src/entity/project/model/services/get-projects.ts index a24eacc..a8ebcb7 100644 --- a/src/entity/project/model/services/get-projects.ts +++ b/src/entity/project/model/services/get-projects.ts @@ -1,10 +1,10 @@ 'use server'; -import { getLang } from '@/shared/config'; -import { CategoryMetadata, getMdx, ProjectMetadata } from '@/shared/lib'; +import { getLang } from '@/shared/config/i18n'; +import { CategoryMetadata, getMdx, ProjectMetadata } from '@/shared/config/mdx'; import fs from 'fs/promises'; import path from 'path'; -import { ProjectsResponse } from '../types/mdx.type'; +import { ProjectsResponse } from '../types/project.type'; export async function getProjects(): Promise { const lang = await getLang(); diff --git a/src/entity/project/model/types/mdx.type.ts b/src/entity/project/model/types/project.type.ts similarity index 78% rename from src/entity/project/model/types/mdx.type.ts rename to src/entity/project/model/types/project.type.ts index 48db0b0..a1d55f0 100644 --- a/src/entity/project/model/types/mdx.type.ts +++ b/src/entity/project/model/types/project.type.ts @@ -1,4 +1,4 @@ -import { CategoryMetadata, ProjectMetadata } from '@/shared/lib'; +import { CategoryMetadata, ProjectMetadata } from '@/shared/config/mdx'; export interface ProjectResponse { metadata: ProjectMetadata; diff --git a/src/features/auth/ui/logout-button/logout-button.tsx b/src/features/auth/ui/logout-button/logout-button.tsx index 4dbaedc..21c4d3f 100644 --- a/src/features/auth/ui/logout-button/logout-button.tsx +++ b/src/features/auth/ui/logout-button/logout-button.tsx @@ -1,6 +1,6 @@ 'use client'; -import { Dictionary } from '@/shared/config'; +import { Dictionary } from '@/shared/config/i18n'; import { Button } from '@nextui-org/react'; import { RxExit } from 'react-icons/rx'; import { logout } from '../../services/logout'; diff --git a/src/features/locale-switcher/locale-switcher.tsx b/src/features/locale-switcher/locale-switcher.tsx index 6e8d145..daee64a 100644 --- a/src/features/locale-switcher/locale-switcher.tsx +++ b/src/features/locale-switcher/locale-switcher.tsx @@ -1,6 +1,6 @@ 'use client'; -import { Dictionary, i18n, Locale } from '@/shared/config'; +import { Dictionary, i18n, Locale } from '@/shared/config/i18n'; import { Button, Dropdown, diff --git a/src/shared/config/i18n/index.ts b/src/shared/config/i18n/index.ts new file mode 100644 index 0000000..e2bcf47 --- /dev/null +++ b/src/shared/config/i18n/index.ts @@ -0,0 +1,9 @@ +import { Dictionary, getDictionary } from './dictionaries'; +import { getLang } from './get-lang'; +import { i18n, Locale } from './i18n.config'; +import { Link } from './link'; +import { useDictionary } from './use-dictionary'; +import { useLang } from './use-lang'; + +export { getDictionary, getLang, i18n, Link, useDictionary, useLang }; +export type { Dictionary, Locale }; diff --git a/src/shared/config/index.ts b/src/shared/config/index.ts deleted file mode 100644 index 5fc5bae..0000000 --- a/src/shared/config/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Dictionary, getDictionary } from './i18n/dictionaries'; -import { getLang } from './i18n/get-lang'; -import { i18n, Locale } from './i18n/i18n.config'; -import { Link } from './i18n/link'; -import { useDictionary } from './i18n/use-dictionary'; -import { useLang } from './i18n/use-lang'; -import { MDXComponentsData } from './mdx/mdx-components'; -import { MDXRemote } from './mdx/mdx-remote'; - -export { - getDictionary, - getLang, - i18n, - Link, - MDXComponentsData, - MDXRemote, - useDictionary, - useLang, -}; -export type { Dictionary, Locale }; diff --git a/src/shared/lib/get-mdx/get-mdx.ts b/src/shared/config/mdx/get-mdx.ts similarity index 86% rename from src/shared/lib/get-mdx/get-mdx.ts rename to src/shared/config/mdx/get-mdx.ts index 7949228..492c753 100644 --- a/src/shared/lib/get-mdx/get-mdx.ts +++ b/src/shared/config/mdx/get-mdx.ts @@ -2,7 +2,7 @@ import fs from 'fs/promises'; import matter from 'gray-matter'; -import { ProjectMetadata } from './types/get-mdx.type'; +import { ProjectMetadata } from '../../config/mdx/types/get-mdx.type'; interface MdxResponse { metadata: T; diff --git a/src/shared/config/mdx/index.ts b/src/shared/config/mdx/index.ts new file mode 100644 index 0000000..3fa675c --- /dev/null +++ b/src/shared/config/mdx/index.ts @@ -0,0 +1,7 @@ +import { getMdx } from './get-mdx'; +import { MDXComponentsData } from './mdx-components'; +import { MDXRemote } from './mdx-remote'; +import { CategoryMetadata, ProjectMetadata } from './types/get-mdx.type'; + +export { getMdx, MDXComponentsData, MDXRemote }; +export type { CategoryMetadata, ProjectMetadata }; diff --git a/src/shared/lib/get-mdx/types/get-mdx.type.ts b/src/shared/config/mdx/types/get-mdx.type.ts similarity index 100% rename from src/shared/lib/get-mdx/types/get-mdx.type.ts rename to src/shared/config/mdx/types/get-mdx.type.ts diff --git a/src/shared/hooks/useCopy/useCopy.tsx b/src/shared/hooks/useCopy/useCopy.tsx index 16ab43a..df9d09c 100644 --- a/src/shared/hooks/useCopy/useCopy.tsx +++ b/src/shared/hooks/useCopy/useCopy.tsx @@ -1,4 +1,4 @@ -import { useDictionary } from '@/shared/config'; +import { useDictionary } from '@/shared/config/i18n'; import { useState } from 'react'; import { useMessage } from '../useMessage/useMessage'; diff --git a/src/shared/lib/get-pathname/get-pathname.ts b/src/shared/lib/get-pathname/get-pathname.ts index 98380ee..bdaeed9 100644 --- a/src/shared/lib/get-pathname/get-pathname.ts +++ b/src/shared/lib/get-pathname/get-pathname.ts @@ -1,6 +1,6 @@ 'use server'; -import { i18n, Locale } from '@/shared/config'; +import { i18n, Locale } from '@/shared/config/i18n'; import { headers } from 'next/headers'; interface GetPathnameProps { diff --git a/src/shared/lib/index.ts b/src/shared/lib/index.ts index 53e3c93..c26d149 100644 --- a/src/shared/lib/index.ts +++ b/src/shared/lib/index.ts @@ -1,8 +1,3 @@ -import { getMdx } from './get-mdx/get-mdx'; -import { - CategoryMetadata, - ProjectMetadata, -} from './get-mdx/types/get-mdx.type'; import { getPathname } from './get-pathname/get-pathname'; import { gitHubRepoLink } from './github-repo-link/github-repo-link'; import { rehypeExtractCodeProps } from './rehype-extract-code-props/rehype-extract-code-props'; @@ -12,12 +7,9 @@ import { toLatin } from './to-latin/to-latin'; export { cn, - getMdx, getPathname, gitHubRepoLink, rehypeExtractCodeProps, toKebabCase, toLatin, }; - -export type { CategoryMetadata, ProjectMetadata }; diff --git a/src/shared/ui/code-block/code-block.tsx b/src/shared/ui/code-block/code-block.tsx index 7f87db2..67acd76 100644 --- a/src/shared/ui/code-block/code-block.tsx +++ b/src/shared/ui/code-block/code-block.tsx @@ -1,6 +1,6 @@ 'use client'; -import { Dictionary } from '@/shared/config'; +import { Dictionary } from '@/shared/config/i18n'; import { FontCode, FontDefault } from '@/shared/const/fonts'; import { cn, gitHubRepoLink } from '@/shared/lib'; import { GitHubPath } from '@/shared/types/github-path'; diff --git a/src/shared/ui/code-block/code.tsx b/src/shared/ui/code-block/code.tsx index 30f9374..a148b66 100644 --- a/src/shared/ui/code-block/code.tsx +++ b/src/shared/ui/code-block/code.tsx @@ -1,6 +1,6 @@ 'use client'; -import { Dictionary } from '@/shared/config'; +import { Dictionary } from '@/shared/config/i18n'; import { FontDefault } from '@/shared/const/fonts'; import { useCopy } from '@/shared/hooks'; import { cn } from '@/shared/lib'; diff --git a/src/shared/ui/copy-button/copy-button.tsx b/src/shared/ui/copy-button/copy-button.tsx index f1d7659..06808b4 100644 --- a/src/shared/ui/copy-button/copy-button.tsx +++ b/src/shared/ui/copy-button/copy-button.tsx @@ -1,6 +1,6 @@ 'use client'; -import { Dictionary } from '@/shared/config'; +import { Dictionary } from '@/shared/config/i18n'; import { useCopy } from '@/shared/hooks'; import { Button, Tooltip, TooltipProps } from '@nextui-org/react'; import { FC } from 'react'; diff --git a/src/shared/ui/download-cv-button/download-cv-button.tsx b/src/shared/ui/download-cv-button/download-cv-button.tsx index efa1f34..3c1982d 100644 --- a/src/shared/ui/download-cv-button/download-cv-button.tsx +++ b/src/shared/ui/download-cv-button/download-cv-button.tsx @@ -1,4 +1,4 @@ -import { Dictionary, Link } from '@/shared/config'; +import { Dictionary, Link } from '@/shared/config/i18n'; import { cn } from '@/shared/lib'; import { Button, ButtonProps } from '@nextui-org/react'; import { FC } from 'react'; diff --git a/src/shared/ui/page-loader/page-loader.tsx b/src/shared/ui/page-loader/page-loader.tsx index 9d0e7c2..85ea05e 100644 --- a/src/shared/ui/page-loader/page-loader.tsx +++ b/src/shared/ui/page-loader/page-loader.tsx @@ -1,5 +1,5 @@ import { Logo } from '@/shared/assets/icon/Logo'; -import { getDictionary } from '@/shared/config'; +import { getDictionary } from '@/shared/config/i18n'; import cn from 'clsx'; import { FC } from 'react'; import cls from './page-loader.module.scss'; diff --git a/src/shared/ui/sidebar-navigation/sidebar-navigation.tsx b/src/shared/ui/sidebar-navigation/sidebar-navigation.tsx index 07fb98f..b7ae102 100644 --- a/src/shared/ui/sidebar-navigation/sidebar-navigation.tsx +++ b/src/shared/ui/sidebar-navigation/sidebar-navigation.tsx @@ -1,7 +1,7 @@ 'use client'; import { ProjectsResponse } from '@/entity/project'; -import { Link } from '@/shared/config'; +import { Link } from '@/shared/config/i18n'; import { SidebarLinks } from '@/shared/const/sidebar-links'; import { cn } from '@nextui-org/react'; import { usePathname } from 'next/navigation'; diff --git a/src/shared/ui/text/text.tsx b/src/shared/ui/text/text.tsx index 487ccef..c6b6efb 100644 --- a/src/shared/ui/text/text.tsx +++ b/src/shared/ui/text/text.tsx @@ -1,4 +1,4 @@ -import { Link } from '@/shared/config'; +import { Link } from '@/shared/config/i18n'; import { cn, toKebabCase, toLatin } from '@/shared/lib'; import { ComponentPropsWithoutRef } from 'react'; import { FiLink } from 'react-icons/fi'; diff --git a/src/widgets/footer/footer-github-link.tsx b/src/widgets/footer/footer-github-link.tsx index 7ab76c8..e29cc13 100644 --- a/src/widgets/footer/footer-github-link.tsx +++ b/src/widgets/footer/footer-github-link.tsx @@ -1,6 +1,6 @@ 'use client'; -import { Dictionary, i18n, Link, Locale } from '@/shared/config'; +import { Dictionary, i18n, Link, Locale } from '@/shared/config/i18n'; import { usePathname } from 'next/navigation'; import { FC } from 'react'; diff --git a/src/widgets/footer/footer-navigation.tsx b/src/widgets/footer/footer-navigation.tsx index 1cafb58..390aa50 100644 --- a/src/widgets/footer/footer-navigation.tsx +++ b/src/widgets/footer/footer-navigation.tsx @@ -1,7 +1,7 @@ 'use client'; import { ProjectsResponse } from '@/entity/project'; -import { Dictionary, Link } from '@/shared/config'; +import { Dictionary, Link } from '@/shared/config/i18n'; import { Button } from '@nextui-org/react'; import { usePathname } from 'next/navigation'; import { useEffect, useState } from 'react'; diff --git a/src/widgets/footer/footer.tsx b/src/widgets/footer/footer.tsx index 9b0cf13..fdd57d0 100644 --- a/src/widgets/footer/footer.tsx +++ b/src/widgets/footer/footer.tsx @@ -1,5 +1,5 @@ import { getProjects } from '@/entity/project'; -import { getDictionary, getLang, Link } from '@/shared/config'; +import { getDictionary, getLang, Link } from '@/shared/config/i18n'; import { FooterGithubLink } from './footer-github-link'; import { FooterNavigation } from './footer-navigation'; import cls from './footer.module.scss'; diff --git a/src/widgets/header/header.tsx b/src/widgets/header/header.tsx index 77af34b..abc49ea 100644 --- a/src/widgets/header/header.tsx +++ b/src/widgets/header/header.tsx @@ -1,4 +1,4 @@ -import { Link } from '@/shared/config'; +import { Link } from '@/shared/config/i18n'; import { StackButtons, StackVariants } from '@/shared/ui'; import { cn, Skeleton } from '@nextui-org/react'; diff --git a/src/widgets/navbar/navbar.tsx b/src/widgets/navbar/navbar.tsx index 50d5005..282b518 100644 --- a/src/widgets/navbar/navbar.tsx +++ b/src/widgets/navbar/navbar.tsx @@ -1,7 +1,7 @@ import { getProjects } from '@/entity/project'; import { Burger, LocaleSwitcher, ThemeSwitcher } from '@/features'; import { Logo } from '@/shared/assets/icon/Logo'; -import { getDictionary, Link } from '@/shared/config'; +import { getDictionary, Link } from '@/shared/config/i18n'; import { DownloadCvButton, GlowingLine, SidebarNavigation } from '@/shared/ui'; import { Button } from '@nextui-org/react'; import { BsGithub } from 'react-icons/bs'; diff --git a/src/widgets/sidebar/sidebar.tsx b/src/widgets/sidebar/sidebar.tsx index 0351c86..a88140e 100644 --- a/src/widgets/sidebar/sidebar.tsx +++ b/src/widgets/sidebar/sidebar.tsx @@ -1,5 +1,5 @@ import { getProjects } from '@/entity/project'; -import { getDictionary } from '@/shared/config'; +import { getDictionary } from '@/shared/config/i18n'; import { cn } from '@/shared/lib'; import { DownloadCvButton, SidebarNavigation } from '@/shared/ui'; import cls from './sidebar.module.scss';