Closed tdawes closed 5 years ago
Sorry about all the linting changes - my IDE applied them automatically.
This is identical to https://github.com/prodo-ai/prodo-kanban/pull/1/files except that it adds a new utility to @prodo/route, matchRoute that matches a route to a slug and extracts the params:
@prodo/route
matchRoute
const path = "/a/b/c" const pattern = "/a/:prop1/:prop2" const match = matchRoute(path, pattern); // equals {prop1: "b", prop2: "c"};
(see tests here for examples)
and uses this instead of passing the boardId as a prop (see here for an example).
boardId
Sorry about all the linting changes - my IDE applied them automatically.
This is identical to https://github.com/prodo-ai/prodo-kanban/pull/1/files except that it adds a new utility to
@prodo/route
,matchRoute
that matches a route to a slug and extracts the params:(see tests here for examples)
and uses this instead of passing the
boardId
as a prop (see here for an example).