mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-28 18:36:23 +02:00
Issues Fixed - Missing pagination fields in API response schemas (page, page_size, has_more) - NOTE enum missing from frontend Zod schema - Missing fields in DocumentRead response construction (content_hash, updated_at) - BlockNote slash menu clipped by overflow-hidden CSS - Sidebar click conflicts - hidden action buttons intercepting clicks - Rewrote All Notes sidebar - replaced fragile custom portal with shadcn Sheet - Missing translation keys for new UI strings - Missing NOTE retrieval logic in researcher agent - Added search to All Notes sidebar - Removed frontend logging - was causing toasters on every page refresh - Added backend logging to document reindex Celery task
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
"use client";
|
|
|
|
import { useAtomValue } from "jotai";
|
|
import { motion } from "motion/react";
|
|
import { useRouter } from "next/navigation";
|
|
import { createSearchSpaceMutationAtom } from "@/atoms/search-spaces/search-space-mutation.atoms";
|
|
import { SearchSpaceForm } from "@/components/search-space-form";
|
|
|
|
export default function SearchSpacesPage() {
|
|
const router = useRouter();
|
|
const { mutateAsync: createSearchSpace } = useAtomValue(createSearchSpaceMutationAtom);
|
|
|
|
const handleCreateSearchSpace = async (data: { name: string; description?: string }) => {
|
|
const result = await createSearchSpace({
|
|
name: data.name,
|
|
description: data.description || "",
|
|
});
|
|
|
|
// Redirect to the newly created search space's onboarding
|
|
router.push(`/dashboard/${result.id}/onboard`);
|
|
|
|
return result;
|
|
};
|
|
|
|
return (
|
|
<motion.div
|
|
className="container mx-auto py-10"
|
|
initial={{ opacity: 0 }}
|
|
animate={{ opacity: 1 }}
|
|
transition={{ duration: 0.5 }}
|
|
>
|
|
<div className="mx-auto max-w-5xl">
|
|
<SearchSpaceForm onSubmit={handleCreateSearchSpace} />
|
|
</div>
|
|
</motion.div>
|
|
);
|
|
}
|