Skip to content

Routes

In-app dictionary route builders.

The kanji/word value is carried in the query string, not a path segment, so the URL path stays ASCII. A Modal-hosted deploy rejects any request whose URL path contains non-ASCII bytes, including a hard reload/bookmark of an SPA route, so a routed kanji or word page must never put Japanese in the path.

Functions

kanjiRoute()

function kanjiRoute(literal): string;

Defined in: src/shared/dict/routes.ts:26

Builds the route to a kanji detail view.

Parameters

Parameter Type Description
literal string The kanji character.

Returns

string

The /dictionary/kanji route with the kanji in the query.


wordRoute()

function wordRoute(term): string;

Defined in: src/shared/dict/routes.ts:16

Builds the route to a word entry view.

Parameters

Parameter Type Description
term string The word.

Returns

string

The /dictionary/word route with the word in the query.