cinny/src/app/hooks/router/useExploreSelected.ts
Ginger be51dc5f12
Revert "Add a page and config option for a room directory server"
This reverts commit 401d8ed930.

Revert "Minor styling changes"

This reverts commit 3de1ce8f2f.

Revert "Use consistent "bookmark" wording in code and UI"

This reverts commit c45cb62e2d.

Revert "Move featured servers into the Featured section"

This reverts commit 53612f4641.
2025-09-13 15:12:10 -04:00

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;
};