route handlers for account/main

This commit is contained in:
2025-05-19 16:56:30 +03:00
parent edd380d78a
commit c0da94f3dc
22 changed files with 601 additions and 150 deletions

View File

@@ -0,0 +1,15 @@
import { SourceType } from '@/app/types'
const pathToSourceMap: Record<string, SourceType> = {
techSupport: 'contact-us', // берем в кавычки значение с дефисом
account: 'account',
}
export const getSourceFromPath = (pathname: string): SourceType => {
const cleanPath = pathname.replace(/^\//, '')
const source = pathToSourceMap[cleanPath] || 'contact-us' // дефолтное значение
// console.log('Final source:', source)
return source
}