mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-04 22:40:29 +03:00
This reverts commit401d8ed930. Revert "Minor styling changes" This reverts commit3de1ce8f2f. Revert "Use consistent "bookmark" wording in code and UI" This reverts commitc45cb62e2d. Revert "Move featured servers into the Featured section" This reverts commit53612f4641.
28 lines
617 B
TypeScript
28 lines
617 B
TypeScript
import { useMatch, useParams } from 'react-router-dom';
|
|
import { getExploreFeaturedPath, getExplorePath } from '../../pages/pathUtils';
|
|
|
|
export const useExploreSelected = (): boolean => {
|
|
const match = useMatch({
|
|
path: getExplorePath(),
|
|
caseSensitive: true,
|
|
end: false,
|
|
});
|
|
|
|
return !!match;
|
|
};
|
|
|
|
export const useExploreFeaturedRooms = (): boolean => {
|
|
const match = useMatch({
|
|
path: getExploreFeaturedPath(),
|
|
caseSensitive: true,
|
|
end: false,
|
|
});
|
|
|
|
return !!match;
|
|
};
|
|
|
|
export const useExploreServer = (): string | undefined => {
|
|
const { server } = useParams();
|
|
|
|
return server;
|
|
};
|