File tree Expand file tree Collapse file tree
apps/chat/src/modules/chats/favorite Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import clsx from 'clsx' ;
22
33import { useForceRerender } from '@llm/commons-front' ;
4- import { useSdkForLoggedIn , useSdkOnFavoriteAction , useSdkSubscribeFavoritesOrThrow } from '@llm/sdk' ;
4+ import { useSdkForLoggedIn } from '@llm/sdk' ;
55import { useI18n } from '~/i18n' ;
66
77import { ChatsContainer } from '../grid' ;
@@ -13,17 +13,8 @@ type Props = {
1313export function ChatsFavoriteSection ( { className } : Props ) {
1414 const t = useI18n ( ) . pack . chats . favorite ;
1515 const { session } = useSdkForLoggedIn ( ) ;
16- const favorites = useSdkSubscribeFavoritesOrThrow ( ) ;
1716 const listReloader = useForceRerender ( ) ;
1817
19- useSdkOnFavoriteAction ( ( ) => {
20- void listReloader . forceRerender ( ) ;
21- } ) ;
22-
23- if ( favorites . loading || ! favorites . items . some ( favorite => favorite . type === 'chat' ) ) {
24- return null ;
25- }
26-
2718 return (
2819 < section className = { clsx ( 'space-y-6 mx-auto w-full max-w-5xl' , className ) } >
2920 < h2 className = "font-semibold text-2xl text-center" >
@@ -32,7 +23,7 @@ export function ChatsFavoriteSection({ className }: Props) {
3223
3324 < ChatsContainer
3425 key = { listReloader . revision }
35- limit = { 4 }
26+ limit = { 2 }
3627 withAutoRefresh = { false }
3728 filters = { {
3829 creatorIds : [ session . token . sub ] ,
You can’t perform that action at this time.
0 commit comments