miking-the-viking/react-route-manager

Add support for RouteRule to return parameterized route with parameters

Opened this issue · 0 comments

ex: Crypto-Holdings redirect if you have no holdings should be that crypto's page /cypto/:whatever/, NOT /crypto

export const RequiresHoldingsInCryptoRedirectRule: RouteRuleGen<
  CryptoState,
  { currency?: string }
> = [
  ({ currency = undefined }) => RequiresHoldingsInCrypto({ currency }),
  CRYPTO,
];