Skip to content

Commit 5c5ad0d

Browse files
committed
update shiny.router functions
1 parent b0a8a48 commit 5c5ad0d

File tree

1 file changed

+5
-7
lines changed
  • inst/examples/showcase

1 file changed

+5
-7
lines changed

inst/examples/showcase/app.R

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,7 @@ makeRouter <- function(items) {
154154
name = item$name,
155155
ui = example$ui(item$id),
156156
rCode = example$rCode
157-
),
158-
server = function() example$server(item$id)
157+
)
159158
)
160159
})
161160
routes <- append(
@@ -221,12 +220,11 @@ makeRouter <- function(items) {
221220
)
222221
)
223222
)
224-
),
225-
server = function(input, output, session) {}
223+
)
226224
)),
227225
routes
228226
)
229-
do.call(make_router, routes)
227+
do.call(router_ui, routes)
230228
}
231229

232230
router <- makeRouter(items)
@@ -254,11 +252,11 @@ shinyApp(
254252
tags$div(
255253
class = "grid",
256254
tags$nav(class = "sidebar", makeNav(sections)),
257-
tags$main(router$ui)
255+
tags$main(router)
258256
)
259257
),
260258
server = function(input, output, session) {
261-
router$server()
259+
router_server()
262260
session$sendCustomMessage("highlight_all", list())
263261
}
264262
)

0 commit comments

Comments
 (0)