feat: wire public posts api
This commit is contained in:
@@ -16,12 +16,8 @@ export function MessageStream({ scope }: MessageStreamProps) {
|
||||
const [sp, setSp] = useSearchParams();
|
||||
|
||||
const type = sp.get("type") || "all";
|
||||
const language = sp.get("language") || "";
|
||||
|
||||
const params = useMemo(
|
||||
() => ({ scope, type, language, lang }),
|
||||
[scope, type, language, lang],
|
||||
);
|
||||
const params = useMemo(() => ({ scope, type, lang }), [scope, type, lang]);
|
||||
|
||||
const { items, isLoading, error, hasMore, loadMore, reset } =
|
||||
usePostStream(params);
|
||||
@@ -68,12 +64,7 @@ export function MessageStream({ scope }: MessageStreamProps) {
|
||||
|
||||
return (
|
||||
<div className="mx-auto max-w-full px-3 md:max-w-[820px] lg:max-w-[1080px] xl:max-w-[1180px]">
|
||||
<FilterChips
|
||||
type={type}
|
||||
language={language}
|
||||
onTypeChange={(v) => updateParam("type", v)}
|
||||
onLanguageChange={(v) => updateParam("language", v)}
|
||||
/>
|
||||
<FilterChips type={type} onTypeChange={(v) => updateParam("type", v)} />
|
||||
|
||||
<div className="flex flex-col gap-2 pb-10 pt-2">
|
||||
{groups.map((group) => (
|
||||
|
||||
Reference in New Issue
Block a user