Ott 214 combobox countries t9ns (#29)
parent
35f1780a6a
commit
a6fdfe962f
@ -1,3 +1,2 @@ |
|||||||
export * from './usePageId' |
export * from './usePageId' |
||||||
export * from './useCurrentLang' |
|
||||||
export * from './useToggle' |
export * from './useToggle' |
||||||
|
|||||||
@ -1,2 +0,0 @@ |
|||||||
// временно, будем считывать из стора(контекста) лексики
|
|
||||||
export const useCurrentLang = () => 'eng' |
|
||||||
@ -1 +1,13 @@ |
|||||||
export const usePageId = () => {} |
import { useParams } from 'react-router-dom' |
||||||
|
|
||||||
|
type Params = { |
||||||
|
pageId: string, |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Хук возвращает id страницы |
||||||
|
*/ |
||||||
|
export const usePageId = () => { |
||||||
|
const { pageId } = useParams<Params>() |
||||||
|
return Number(pageId) |
||||||
|
} |
||||||
|
|||||||
Loading…
Reference in new issue