Files
AFFiNE-Mirror/packages/frontend/routes
DarkSky c2c7dde06c chore: bump deps (#14506)
<!-- 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 -->
2026-02-24 09:11:41 +08:00
..
2025-04-23 09:49:11 +00:00
2026-02-24 09:11:41 +08:00
2025-04-23 09:49:11 +00:00

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']>();
}