diff --git a/package-lock.json b/package-lock.json index 5e29af6..6d47047 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "@tailwindcss/postcss": "^4.1.17", "@tanstack/react-query": "^5.90.11", + "@vkid/sdk": "^2.6.2", "clsx": "^2.1.1", "jose": "^6.1.2", "next": "^16.0.7", @@ -2542,6 +2543,15 @@ "win32" ] }, + "node_modules/@vkid/sdk": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/@vkid/sdk/-/sdk-2.6.2.tgz", + "integrity": "sha512-TCaGh6BvQNY8Atru0KJXdGuwm70y9WS2xBOLNripHjYMEcft0BMIiLKUvJ7pAeJOtk/15MvPaUIEmBS2Vt0NBg==", + "license": "MIT", + "dependencies": { + "crypto-js": "^4.1.1" + } + }, "node_modules/acorn": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", @@ -3080,6 +3090,12 @@ "node": ">= 8" } }, + "node_modules/crypto-js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==", + "license": "MIT" + }, "node_modules/csstype": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", diff --git a/package.json b/package.json index d52f4d0..15747bf 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "dependencies": { "@tailwindcss/postcss": "^4.1.17", "@tanstack/react-query": "^5.90.11", + "@vkid/sdk": "^2.6.2", "clsx": "^2.1.1", "jose": "^6.1.2", "next": "^16.0.7", diff --git a/src/app/lib/action.ts b/src/app/actions/action.ts similarity index 91% rename from src/app/lib/action.ts rename to src/app/actions/action.ts index 7541103..7bee890 100644 --- a/src/app/lib/action.ts +++ b/src/app/actions/action.ts @@ -1,6 +1,6 @@ 'use server' -import { getSessionData } from '@/app/lib/session'; -import { localDevelopmentUrl } from '@/app/lib/definitions'; +import { getSessionData } from '@/app/actions/session'; +import { localDevelopmentUrl } from '@/app/actions/definitions'; const API_BASE_URL = process.env.NODE_ENV === 'development' ? localDevelopmentUrl diff --git a/src/app/actions/auth.ts b/src/app/actions/auth.ts index 83d2fd7..221ae8b 100644 --- a/src/app/actions/auth.ts +++ b/src/app/actions/auth.ts @@ -1,7 +1,7 @@ 'use server' -import { SignupFormSchema, loginFormSchema, localDevelopmentUrl } from '@/app/lib/definitions'; -import { createSession, deleteSession, getSessionData } from '@/app/lib/session'; +import { SignupFormSchema, loginFormSchema, localDevelopmentUrl } from '@/app/actions/definitions'; +import { createSession, deleteSession, getSessionData } from '@/app/actions/session'; import { redirect } from 'next/navigation'; const API_BASE_URL = process.env.NODE_ENV === 'development' diff --git a/src/app/lib/definitions.ts b/src/app/actions/definitions.ts similarity index 81% rename from src/app/lib/definitions.ts rename to src/app/actions/definitions.ts index 8c39fa0..885da0f 100644 --- a/src/app/lib/definitions.ts +++ b/src/app/actions/definitions.ts @@ -25,18 +25,22 @@ export const SignupFormSchema = z email: z.email({ error: 'Пожалуйста, введите правильный адрес электронной почты.' }).trim(), phone: z .string() - .min(12, { error: 'Пожалуйста, введите телефонный номер' }), + .min(12, { error: 'Пожалуйста, введите телефонный номер.' }), password: z .string() .min(8, { error: 'Длина пароля должна быть не менее 8 символов.' }) .regex(/[a-zA-Z]/, { error: 'Пароль должен содержать как минимум 1 букву.' }) .regex(/[0-9]/, { error: 'Пароль должен содержать как минимум 1 цифру.' }) + .refine((value) => !/[а-яёА-ЯЁ]/.test(value), + { + message: 'Пароль не должен содержать кириллицу.' + }) .trim(), confirm_password: z .string(), agree: z .string() - .min(2, { error: 'Вы должны ознакомиться с условиями использования и политикой конфиденциальности' }) + .min(2, { error: 'Пожалуйста, ознакомьтесь с условиями использования и политикой конфиденциальности.' }) }) .refine((data) => data.password === data.confirm_password, { message: 'Повторите пароль', diff --git a/src/app/lib/session.ts b/src/app/actions/session.ts similarity index 100% rename from src/app/lib/session.ts rename to src/app/actions/session.ts diff --git a/src/app/lib/sessions.ts b/src/app/actions/sessions.ts similarity index 90% rename from src/app/lib/sessions.ts rename to src/app/actions/sessions.ts index 5d374b0..aabab90 100644 --- a/src/app/lib/sessions.ts +++ b/src/app/actions/sessions.ts @@ -1,6 +1,6 @@ import 'server-only' import { cookies } from 'next/headers' -import { decrypt } from '@/app/lib/session' +import { decrypt } from '@/app/actions/session' export async function updateSession() { const session = (await cookies()).get('session')?.value diff --git a/src/app/pages/layout.tsx b/src/app/pages/layout.tsx index 2d911f5..b9830f5 100644 --- a/src/app/pages/layout.tsx +++ b/src/app/pages/layout.tsx @@ -1,9 +1,9 @@ import NavLinks from '@/app/ui/nav-links' -import styles from '@/app/page.module.scss' +import styles from '@/app/styles/page.module.scss' import HeaderPanel from '../ui/header/headerPanel'; import { getQueryClient } from '@/app/providers/getQueryClient'; import { HydrationBoundary, dehydrate } from '@tanstack/react-query'; -import { getUserData } from '@/app/lib/action'; +import { getUserData } from '@/app/actions/action'; export default async function Layout({ children }: { children: React.ReactNode }) { const queryClient = getQueryClient(); @@ -19,7 +19,7 @@ export default async function Layout({ children }: { children: React.ReactNode }
-
+
{children} diff --git a/src/app/pages/marking-audio/page.tsx b/src/app/pages/marking-audio/page.tsx new file mode 100644 index 0000000..7ffa2a9 --- /dev/null +++ b/src/app/pages/marking-audio/page.tsx @@ -0,0 +1,14 @@ +import ProtectedFilesTable from '@/app/ui/marking-page/protected-files-table'; +import ProtectionSummary from '@/app/ui/marking-page/protection-summary'; +import TestSection from '@/app/ui/marking-page/test-section'; + +export default function Page() { + return ( +
+

Защита аудио

+ + + +
+ ) +} \ No newline at end of file diff --git a/src/app/pages/marking-photo/page.tsx b/src/app/pages/marking-photo/page.tsx index 9d10b86..ad4a0d0 100644 --- a/src/app/pages/marking-photo/page.tsx +++ b/src/app/pages/marking-photo/page.tsx @@ -1,14 +1,14 @@ import ProtectedFilesTable from '@/app/ui/marking-page/protected-files-table'; import ProtectionSummary from '@/app/ui/marking-page/protection-summary'; import TestSection from '@/app/ui/marking-page/test-section'; -import UploadSection from '@/app/ui/marking-page/upload-section'; +import UploadSectionImage from '@/app/ui/marking-page/upload-section-image'; export default function Page() { return (
-

🛡️ Защита изображений

+

Защита изображений

- +
diff --git a/src/app/pages/marking-video/page.tsx b/src/app/pages/marking-video/page.tsx new file mode 100644 index 0000000..e8bf7be --- /dev/null +++ b/src/app/pages/marking-video/page.tsx @@ -0,0 +1,14 @@ +import ProtectedFilesTable from '@/app/ui/marking-page/protected-files-table'; +import ProtectionSummary from '@/app/ui/marking-page/protection-summary'; +import TestSection from '@/app/ui/marking-page/test-section'; + +export default function Page() { + return ( +
+

Защита видео

+ + + +
+ ) +} \ No newline at end of file diff --git a/src/app/styles/login.module.scss b/src/app/styles/login.module.scss index eec11df..b54f42f 100644 --- a/src/app/styles/login.module.scss +++ b/src/app/styles/login.module.scss @@ -65,6 +65,10 @@ font-size: 16px; transition: all 0.3s; background: #f9fafb; + + &[type="password"]::-ms-reveal { + display: none; + } } .form-options { @@ -74,6 +78,12 @@ margin-bottom: 20px; } +.form-error { + color: #fb2c36; + font-size: .875rem; + margin-bottom: 15px; +} + .form-checkbox { display: flex; align-items: center; diff --git a/src/app/styles/marking-pages.scss b/src/app/styles/marking-pages.scss index 98a69dd..3752eba 100644 --- a/src/app/styles/marking-pages.scss +++ b/src/app/styles/marking-pages.scss @@ -66,13 +66,65 @@ margin-bottom: 10px; } - p { + .description { color: #6b7280; margin-bottom: 20px; } .btn-primary { background: linear-gradient(45deg, #6566f1, #01579b); + margin-bottom: 20px; + } + } + + .selected-file { + border-radius: 15px; + background: #fff; + padding: 10px; + + &-file-info { + text-align: left; + } + + .uploaded-image { + border-radius: 0.25rem; + max-height: calc(4px * 40); + margin-inline: auto; + margin-bottom: 20px; + border: 1px solid #d1d5db; + } + + .btn-confirm { + background: linear-gradient(45deg, #6566f1, #01579b); + color: white; + border: none; + padding: 5px 15px; + border-radius: 12px; + cursor: pointer; + font-weight: 600; + font-size: 16px; + transition: 0.3s; + min-width: 160px; + transform: translateY(0px); + box-shadow: none; + } + + .btn-cancel { + background: #fff; + color: rgb(99, 102, 241); + border: 2px solid rgb(99, 102, 241); + padding: 5px 15px; + border-radius: 12px; + cursor: pointer; + font-weight: 600; + font-size: 16px; + transition: 0.3s; + min-width: 120px; + } + + .btn:hover { + transform: translateY(-2px); + box-shadow: 0 8px 25px #6366f14d; } } } diff --git a/src/app/page.module.scss b/src/app/styles/page.module.scss similarity index 82% rename from src/app/page.module.scss rename to src/app/styles/page.module.scss index 7b41cb8..a0f962b 100644 --- a/src/app/page.module.scss +++ b/src/app/styles/page.module.scss @@ -1,4 +1,4 @@ -.mainContainter { +.main-containter { margin-left: 280px; flex: 1; padding: 30px; diff --git a/src/app/ui/ui.module.scss b/src/app/styles/ui.module.scss similarity index 97% rename from src/app/ui/ui.module.scss rename to src/app/styles/ui.module.scss index 8086a1f..1bab389 100644 --- a/src/app/ui/ui.module.scss +++ b/src/app/styles/ui.module.scss @@ -25,7 +25,6 @@ &:hover { background: rgba(255, 255, 255, 0.15); color: white; - transform: translateX(5px) } svg { @@ -40,6 +39,10 @@ font-size: 14px; border-radius: 0; margin-right: 0; + + &:last-child { + margin-bottom: 0; + } } .nav-dropdown { diff --git a/src/app/ui/header/notificationsButton.tsx b/src/app/ui/header/notificationsButton.tsx index e7ba067..1a4906a 100644 --- a/src/app/ui/header/notificationsButton.tsx +++ b/src/app/ui/header/notificationsButton.tsx @@ -1,7 +1,7 @@ "use client" import { useState, useRef } from 'react'; -import { fetchFruits } from '@/app/lib/action'; +import { fetchFruits } from '@/app/actions/action'; import { useClickOutside } from '@/app/hooks/useClickOutside'; import Link from 'next/link'; diff --git a/src/app/ui/header/userMenuButton.tsx b/src/app/ui/header/userMenuButton.tsx index 06e4d98..7acfdf7 100644 --- a/src/app/ui/header/userMenuButton.tsx +++ b/src/app/ui/header/userMenuButton.tsx @@ -3,7 +3,7 @@ import { useState, useRef } from 'react'; import { useClickOutside } from '@/app/hooks/useClickOutside'; import Link from 'next/link'; -import { getUserData } from '@/app/lib/action'; +import { getUserData } from '@/app/actions/action'; import { useQuery } from '@tanstack/react-query'; import { logout } from '@/app/actions/auth'; diff --git a/src/app/ui/inputs/vk-login.tsx b/src/app/ui/inputs/vk-login.tsx new file mode 100644 index 0000000..cc78bc3 --- /dev/null +++ b/src/app/ui/inputs/vk-login.tsx @@ -0,0 +1,114 @@ +'use client' + +import { Config, OneTap } from '@vkid/sdk'; + +import { useEffect, useRef } from 'react'; + +const VKAuthDynamic = () => { + const containerRef = useRef(null); + const isInitialized = useRef(false); + + useEffect(() => { + // Динамическая загрузка SDK + const loadVKIDSDK = async () => { + try { + // Проверяем, не загружен ли уже SDK + if (window.VKIDSDK) return window.VKIDSDK; + + const { default: VKID } = await import('@vkid/sdk'); + window.VKIDSDK = VKID; + return VKID; + } catch (error) { + console.error('Failed to load VKID SDK:', error); + return null; + } + }; + + const initialize = async () => { + if (isInitialized.current) return; + + const VKID = await loadVKIDSDK(); + if (!VKID || !containerRef.current) return; + + isInitialized.current = true; + + try { + // Конфигурация + VKID.Config.init({ + app: Number(process.env.NEXT_PUBLIC_VK_APP_ID) || 1111111, + redirectUrl: process.env.NEXT_PUBLIC_REDIRECT_URL || window.location.origin, + responseMode: VKID.ConfigResponseMode.Callback, + source: VKID.ConfigSource.LOWCODE, + scope: '', + }); + + // Создание и рендеринг виджета + const oneTap = new VKID.OneTap(); + + oneTap + .render({ + container: containerRef.current, + showAlternativeLogin: true, + }) + .on(VKID.WidgetEvents.ERROR, handleError) + .on(VKID.OneTapInternalEvents.LOGIN_SUCCESS, async (payload) => { + const { code, device_id } = payload; + + try { + const authData = await VKID.Auth.exchangeCode(code, device_id); + handleSuccess(authData); + } catch (error) { + handleError(error); + } + }); + } catch (error) { + console.error('VKID initialization error:', error); + } + }; + + initialize(); + + return () => { + // Очистка + isInitialized.current = false; + }; + }, []); + + const handleSuccess = async (data) => { + try { + // Отправка данных на ваш API endpoint + const response = await fetch('/api/auth/vk-callback', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(data), + }); + + const result = await response.json(); + + if (response.ok) { + // Успешная авторизация + console.log('Authentication successful:', result); + // Перенаправление или обновление состояния + window.location.href = '/dashboard'; // Пример редиректа + } else { + handleError(result); + } + } catch (error) { + console.error('Server request failed:', error); + } + }; + + const handleError = (error) => { + console.error('Authentication error:', error); + // Можно показать уведомление пользователю + }; + + return ( +
+
+ vk +
+ ); +}; + +export default VKAuthDynamic; \ No newline at end of file diff --git a/src/app/ui/login-form.tsx b/src/app/ui/login-form.tsx index 4520894..48e7995 100644 --- a/src/app/ui/login-form.tsx +++ b/src/app/ui/login-form.tsx @@ -23,7 +23,7 @@ export default function LoginForm() { defaultValue={state?.previousState?.email ? state?.previousState?.email : ''} /> {state?.error?.email && ( -

{state?.error?.email}

+

{state?.error?.email}

)}
@@ -36,11 +36,11 @@ export default function LoginForm() { placeholder="Введите пароль" /> {state?.error?.password && ( -

{state?.error?.password}

+

{state?.error?.password}

)}
{state?.error.server && ( -

{state?.error.server}

+

{state?.error.server}

)}
diff --git a/src/app/ui/logo-icon.tsx b/src/app/ui/logo-icon.tsx index 2a540de..9485605 100644 --- a/src/app/ui/logo-icon.tsx +++ b/src/app/ui/logo-icon.tsx @@ -1,4 +1,4 @@ -import style from "./ui.module.scss" +import style from "@/app/styles/ui.module.scss" export default function LogoIcon() { return ( diff --git a/src/app/ui/logo.tsx b/src/app/ui/logo.tsx index 30a7608..b7ccb09 100644 --- a/src/app/ui/logo.tsx +++ b/src/app/ui/logo.tsx @@ -1,4 +1,4 @@ -import styles from './ui.module.scss'; +import styles from '@/app/styles/ui.module.scss'; export default function Logo() { return ( diff --git a/src/app/ui/marking-page/protection-summary.tsx b/src/app/ui/marking-page/protection-summary.tsx index d850b9f..6564ade 100644 --- a/src/app/ui/marking-page/protection-summary.tsx +++ b/src/app/ui/marking-page/protection-summary.tsx @@ -9,15 +9,11 @@ export default function ProtectionSummary() {
0
-
Защищено
+
Общий размер
0
-
Изображений
-
-
-
100%
-
Уровень защиты
+
Проверки/нарушения
diff --git a/src/app/ui/marking-page/upload-section-image.tsx b/src/app/ui/marking-page/upload-section-image.tsx new file mode 100644 index 0000000..337b5d6 --- /dev/null +++ b/src/app/ui/marking-page/upload-section-image.tsx @@ -0,0 +1,271 @@ +'use client' + +import React, { useRef, useState, useCallback, ChangeEvent, DragEvent } from 'react'; + +// Типы для выбранного файла +interface SelectedFile { + file: File; + preview: string; + name: string; + size: string; + dimensions?: { + width: number; + height: number; + }; +} + +type SupportedFormat = 'image/jpeg' | 'image/png' | 'image/gif' | 'image/bmp'; +type FileExtension = 'jpg' | 'jpeg' | 'png' | 'gif' | 'bmp'; + +export default function UploadSectionImage() { + const fileInputRef = useRef(null); + const [isDragging, setIsDragging] = useState(false); + const [selectedFile, setSelectedFile] = useState(null); + const [error, setError] = useState(null); + + const SUPPORTED_FORMATS: SupportedFormat[] = [ + 'image/jpeg', + 'image/png', + 'image/gif', + 'image/bmp' + ]; + + const ALLOWED_EXTENSIONS: FileExtension[] = ['jpg', 'jpeg', 'png', 'gif', 'bmp']; + + + const validateFile = (file: File): { isValid: boolean; errorMessage?: string } => { + if (!SUPPORTED_FORMATS.includes(file.type as SupportedFormat)) { + const extension = file.name.split('.').pop()?.toLowerCase(); + if (!extension || !ALLOWED_EXTENSIONS.includes(extension as FileExtension)) { + return { + isValid: false, + errorMessage: 'Неподдерживаемый формат файла.' + }; + } + } + + const MAX_SIZE = 10 * 1024 * 1024; + if (file.size > MAX_SIZE) { + return { + isValid: false, + errorMessage: 'Файл слишком большой. Максимальный размер: 10MB' + }; + } + + return { isValid: true }; + }; + + const getImageDimensions = (file: File): Promise<{ width: number; height: number }> => { + return new Promise((resolve, reject) => { + const img = new Image(); + const objectUrl = URL.createObjectURL(file); + + img.onload = () => { + const dimensions = { + width: img.width, + height: img.height + }; + URL.revokeObjectURL(objectUrl); + resolve(dimensions); + }; + + img.onerror = () => { + URL.revokeObjectURL(objectUrl); + reject(new Error('Не удалось загрузить изображение')); + }; + + img.src = objectUrl; + }); + }; + + const handleFileSelect = useCallback(async (file: File | null): Promise => { + if (!file) { + setError(null); + return; + } + + setError(null); + + const validation = validateFile(file); + if (!validation.isValid) { + setError(validation.errorMessage || 'Неизвестная ошибка валидации'); + return; + } + + try { + const dimensions = await getImageDimensions(file); + + if (dimensions.width < 150 || dimensions.height < 150 || + dimensions.width > 4000 || dimensions.height > 4000) { + setError(`Размер изображения: ${dimensions.width}x${dimensions.height}. Допустимый диапазон: 150x150 - 4000x4000 пикселей.`); + return; + } + + // Создание превью + const objectUrl = URL.createObjectURL(file); + + setSelectedFile({ + file, + preview: objectUrl, + name: file.name, + size: `${(file.size / 1024 / 1024).toFixed(2)} MB`, + dimensions + }); + + console.log('Файл обработан:', { + name: file.name, + type: file.type, + size: file.size, + dimensions + }); + + } catch (err) { + setError(err instanceof Error ? err.message : 'Ошибка при обработке файла'); + } + }, []); + + const handleFileInputChange = (event: ChangeEvent): void => { + const file = event.target.files?.[0] || null; + handleFileSelect(file); + + if (fileInputRef.current) { + fileInputRef.current.value = ''; + } + }; + + const handleButtonClick = (): void => { + if (fileInputRef.current) { + fileInputRef.current.click(); + } + }; + + const handleDragOver = (event: DragEvent): void => { + event.preventDefault(); + setIsDragging(true); + }; + + const handleDragLeave = (): void => { + setIsDragging(false); + }; + + const handleDrop = (event: DragEvent): void => { + event.preventDefault(); + setIsDragging(false); + + const file = event.dataTransfer.files[0]; + handleFileSelect(file); + }; + + const handleClearFile = (): void => { + if (selectedFile) { + URL.revokeObjectURL(selectedFile.preview); + } + setSelectedFile(null); + setError(null); + }; + + React.useEffect(() => { + return () => { + if (selectedFile) { + URL.revokeObjectURL(selectedFile.preview); + } + }; + }, [selectedFile]); + + return ( +
+

📷 Загрузить изображение для защиты

+ +
+

Перетащите изображения сюда

+

+ Размер: 150x150 - 4000x4000 пикселей, форматы: JPG, PNG, GIF, BMP (WEBP НЕ поддерживается) +

+ + + + + + {error && ( +
+

❌ {error}

+
+ )} + + {selectedFile && ( +
+
+

+ Файл: {selectedFile.name} +

+

+ Размер: {selectedFile.size} +

+

+ Стоимость защиты: 0 +

+

+ Текущий баланс: 0 +

+
+ + Предпросмотр загруженного изображения setError('Не удалось загрузить превью изображения')} + /> + +
+ + +
+
+ )} +
+
+ ); +} \ No newline at end of file diff --git a/src/app/ui/marking-page/upload-section.tsx b/src/app/ui/marking-page/upload-section.tsx deleted file mode 100644 index b9c86c8..0000000 --- a/src/app/ui/marking-page/upload-section.tsx +++ /dev/null @@ -1,21 +0,0 @@ -export default function UploadSection() { - return ( -
-

- 📷 Загрузить изображение для защиты -

-
-
🛡️
-

- Перетащите изображения сюда -

-

- Размер: 150x150 - 4000x4000 пикселей, форматы: JPG, PNG, GIF, BMP (WEBP НЕ поддерживается) -

- -
-
- ) -} \ No newline at end of file diff --git a/src/app/ui/nav-link-dropdown.tsx b/src/app/ui/nav-link-dropdown.tsx index 3a4f95d..c083c02 100644 --- a/src/app/ui/nav-link-dropdown.tsx +++ b/src/app/ui/nav-link-dropdown.tsx @@ -1,5 +1,5 @@ -import styles from '@/app/ui/ui.module.scss'; -import { useState } from 'react'; +import styles from '@/app/styles/ui.module.scss'; +import { useState, useRef } from 'react'; import Link from 'next/link'; import clsx from 'clsx'; import { usePathname } from 'next/navigation'; @@ -19,42 +19,32 @@ export default function DropDownList() { }, { name: 'Маркировка видео', - href: '/pages/emptypage' + href: '/pages/marking-video' }, { name: 'Маркировка аудио', - href: '/pages/emptypage' - }, - { - name: 'Маркировка PDF', - href: '/pages/emptypage' - }, - { - name: 'Маркировка PHP/JS', - href: '/pages/emptypage' - }, - { - name: 'Маркировка Текста', - href: '/pages/emptypage' - }, + href: '/pages/marking-audio' + } ]; return ( -
+
-
- - - -

Маркировка

- - - + onClick={dropDownHandler} + > +
+ + + +

Маркировка

+ + + +
    -
+ ) } \ No newline at end of file diff --git a/src/app/ui/nav-links.tsx b/src/app/ui/nav-links.tsx index ecd1fc8..c459d05 100644 --- a/src/app/ui/nav-links.tsx +++ b/src/app/ui/nav-links.tsx @@ -3,7 +3,7 @@ import Link from 'next/link'; import { usePathname } from 'next/navigation'; import clsx from 'clsx'; -import styles from './ui.module.scss' +import styles from '@/app/styles/ui.module.scss' import Logo from '@/app/ui/logo'; import DropDownList from '@/app/ui/nav-link-dropdown'; import { logout } from '@/app/actions/auth'; diff --git a/src/app/ui/test.tsx b/src/app/ui/test.tsx index 10f461b..b1c4047 100644 --- a/src/app/ui/test.tsx +++ b/src/app/ui/test.tsx @@ -1,7 +1,7 @@ 'use client'; import { useQuery } from '@tanstack/react-query'; -import { getUserData } from '@/app/lib/action'; +import { getUserData } from '@/app/actions/action'; export default function HomePage() { const { diff --git a/src/proxy.ts b/src/proxy.ts index 4c55367..225b469 100644 --- a/src/proxy.ts +++ b/src/proxy.ts @@ -1,6 +1,6 @@ import { NextResponse, NextRequest } from 'next/server'; import { cookies } from 'next/headers' -import { decrypt } from '@/app/lib/session'; +import { decrypt } from '@/app/actions/session'; const protectedRoutes = ['/pages'] const publicRoutes = ['/login', '/register', '/']