Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
import { useLocalize, TranslationKeys } from '~/hooks';
import { CategoryIcon } from '~/components/Prompts';
import { useGetCategories } from '~/data-provider';
const loadingCategories: { label: TranslationKeys; value: string }[] = [
{
label: 'com_ui_loading',
value: '',
},
];
const emptyCategory: { label: TranslationKeys; value: string } = {
label: 'com_ui_empty_category',
value: '',
};
const useCategories = ({
className = '',
hasAccess = true,
}: {
className?: string;
hasAccess?: boolean;
}) => {
const localize = useLocalize();
const { data: categories = loadingCategories } = useGetCategories({
enabled: hasAccess,
select: (data) =>
data.map((category) => ({
label: localize(category.label as TranslationKeys),
value: category.value,
icon: category.value ? (
<CategoryIcon category={category.value} className={className} />
) : null,
})),
});
return { categories, emptyCategory };
};
export default useCategories;