mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-23 06:04:23 +03:00
Add additional param types.
This commit is contained in:
parent
d9f0a3ea08
commit
4c2e9d264a
@ -135,6 +135,12 @@ routeToPath routes =
|
||||
|
||||
RoutePattern.OptionalParam2 name ->
|
||||
Elm.list []
|
||||
|
||||
RoutePattern.RequiredSplatParam2 ->
|
||||
Elm.val "TODO"
|
||||
|
||||
RoutePattern.OptionalSplatParam2 ->
|
||||
Elm.val "TODO"
|
||||
)
|
||||
|> Elm.list
|
||||
)
|
||||
@ -158,6 +164,12 @@ routeToPath routes =
|
||||
|
||||
RoutePattern.OptionalParam2 name ->
|
||||
maybeToList.call (Elm.get name params)
|
||||
|
||||
RoutePattern.RequiredSplatParam2 ->
|
||||
Elm.val "Debug.todo \"\""
|
||||
|
||||
RoutePattern.OptionalSplatParam2 ->
|
||||
Elm.val "Debug.todo \"\""
|
||||
)
|
||||
|> Elm.list
|
||||
)
|
||||
|
@ -303,6 +303,8 @@ type RouteParam
|
||||
= StaticParam String
|
||||
| DynamicParam String
|
||||
| OptionalParam2 String
|
||||
| RequiredSplatParam2
|
||||
| OptionalSplatParam2
|
||||
|
||||
|
||||
toVariantName : RoutePattern -> { variantName : String, params : List RouteParam }
|
||||
@ -342,13 +344,13 @@ toVariantName route =
|
||||
|
||||
RequiredSplat ->
|
||||
( "SPLAT_"
|
||||
, DynamicParam "TODO"
|
||||
, RequiredSplatParam2
|
||||
|> Just
|
||||
)
|
||||
|
||||
OptionalSplat ->
|
||||
( "SPLAT__"
|
||||
, DynamicParam "TODO"
|
||||
, OptionalSplatParam2
|
||||
|> Just
|
||||
)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user