Skip to main content

Categories

The Categories component renders the list of all available categories .
This list is composed of items containing category's image, title, info and a follow button, that allows users to follow/unfollow a category.
If set as an option via props, at the top of the component will appear a search bar that allows the users to filter categories.

Usage

 import React from 'react';
import {SCContextProvider} from '@selfcommunity/react-core';
import {Categories} from '@selfcommunity/react-ui';

function App() {
const conf = {
portal: '<community-path>',
session: {
type: 'OAuth',
token: '<community-token>',
refreshToken: '<community-refresh-token>',
refreshTokenEndpoint: '<community-refresh-endpoint>',
},
};
return (
<SCContextProvider conf={conf}><Categories /></SCContextProvider>
);
}