Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

452 B
Raw Blame
import { useEffect } from 'react';

import type { DynamicRouteMeta } from '@/spa/router/routeMeta';

export const usePublishDynamicRouteMeta = (
  { avatar, avatarKind, avatarSeed, backgroundColor, title }: DynamicRouteMeta,
  onResolve: (meta: DynamicRouteMeta) => void,
) => {
  useEffect(() => {
    onResolve({ avatar, avatarKind, avatarSeed, backgroundColor, title });
  }, [avatar, avatarKind, avatarSeed, backgroundColor, onResolve, title]);
};