import { SourceType } from '@/app/types' const pathToSourceMap: Record = { 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 }