mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-14 08:36:22 +08:00
c2c7dde06c
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Version bumped to 0.26.3 across the project and Helm charts. * Removed an unused dependency (minimatch) from multiple packages. * Updated build/tooling and packaging metadata, including packaging maker replacement. * Adjusted app release metadata and platform packaging config. * **Tests** * Updated test snapshots to reflect minor presentational styling adjustments. <!-- 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']>();
}