mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat: implement mod queue
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { useAccountSubplebbits } from '@plebbit/plebbit-react-hooks';
|
||||
import { useMemo } from 'react';
|
||||
import { MultisubSubplebbit } from './use-default-subplebbits';
|
||||
|
||||
export const useAccountSubplebbitsWithMetadata = (): MultisubSubplebbit[] => {
|
||||
const { accountSubplebbits } = useAccountSubplebbits();
|
||||
|
||||
return useMemo(() => {
|
||||
return Object.entries(accountSubplebbits || {}).map(([address, sub]) => ({
|
||||
address,
|
||||
title: (sub as any).title,
|
||||
// We can map other fields if needed
|
||||
}));
|
||||
}, [accountSubplebbits]);
|
||||
};
|
||||
@@ -1,4 +1,3 @@
|
||||
import { useMemo } from 'react';
|
||||
import useSubplebbitsStore from '@plebbit/plebbit-react-hooks/dist/stores/subplebbits';
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user