diff --git a/apps/masterbots.ai/app/404/page.tsx b/apps/masterbots.ai/app/404/page.tsx new file mode 100644 index 00000000..9da8a557 --- /dev/null +++ b/apps/masterbots.ai/app/404/page.tsx @@ -0,0 +1,5 @@ +export default async function NotFoudPage() { + return ( +
NOT Found
+ ) +} diff --git a/apps/masterbots.ai/components/shared/category-tabs/category-link.tsx b/apps/masterbots.ai/components/shared/category-tabs/category-link.tsx index 8b62ab4a..027e4cc7 100644 --- a/apps/masterbots.ai/components/shared/category-tabs/category-link.tsx +++ b/apps/masterbots.ai/components/shared/category-tabs/category-link.tsx @@ -1,6 +1,7 @@ import { motion } from 'framer-motion' import type { Category } from '@repo/mb-genql' import Link from 'next/link' +import { toSlug } from '@repo/mb-lib' export function CategoryLink({ category, @@ -16,11 +17,7 @@ export function CategoryLink({ ? 'dark:text-white' : 'dark:hover:text-white dark:text-[#F4F4F580] text-zinc-500 hover:text-black' } relative rounded-full px-3 py-1.5 text-sm font-medium outline-sky-400 transition focus-visible:outline-2`} - href={ - category === 'all' - ? '/' - : `/${category.name.toLowerCase().replace(/\s+/g, '_').replace(/\&/g, '_')}` - } + href={category === 'all' ? '/' : `/${toSlug(category.name)}`} id={id} shallow style={{ diff --git a/apps/masterbots.ai/components/shared/thread-list.tsx b/apps/masterbots.ai/components/shared/thread-list.tsx index c4fbfa1d..d9841bc3 100644 --- a/apps/masterbots.ai/components/shared/thread-list.tsx +++ b/apps/masterbots.ai/components/shared/thread-list.tsx @@ -19,7 +19,7 @@ export function ThreadList({ const searchParams = useSearchParams() const queryKey = [usePathname() + searchParams.get('query')] const loadMoreRef = useRef(null) - const threads = useQuery({ + const threads = useQuery({ queryKey, queryFn: async () => { const searchFilter = { @@ -58,7 +58,6 @@ export function ThreadList({ // ThreadDialog and ThreadDoubleAccordion can be used interchangeably const ThreadComponent = dialog ? ThreadDialog : ThreadDoubleAccordion - console.log('ThreadList', queryKey) return (
- {threads.map((thread: Thread, key) => ( + {threads.data.map((thread: Thread, key) => (