mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 17:16:16 +08:00
027f741ed6
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* Updated dependency versions across the monorepo (notably zod →
^3.25.76 and vitest-related packages → ^3.2.4), plus minor package bumps
to align tooling and libraries. These are manifest/test-tooling updates
only; no public API, behavior, or end-user features were changed.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Routes
Usage
Path Factories
import { FACTORIES } from '@affine/routes';
const path = FACTORIES.workspace.doc({ workspaceId: '123', docId: '456' });
// ^^^^ with typecheck
Register router
import { ROUTES } from '@affine/routes';
function Routes() {
return <Router path={ROUTES.admin.index} element={} />;
}
Path Parameter
import { RouteParamsTypes } from '@affine/routes';
function Doc() {
const { workspaceId, docId } = useParams<RouteParamsTypes['workspace']['doc']>();
}
function Attachment() {
const { workspaceId, docId, attachmentId } = useParams<RouteParamsTypes['workspace']['doc']['attachment']>();
}