You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import { useParams } from 'react-router-dom'
|
|
|
|
type Params = {
|
|
pageId: string,
|
|
}
|
|
|
|
/**
|
|
* Хук возвращает id страницы
|
|
*/
|
|
export const usePageId = () => {
|
|
const { pageId } = useParams<Params>()
|
|
return Number(pageId)
|
|
}
|
|
|