shiny use renderUI

I want to get user information from the database, and then render the bs4UserMenu function, but it doesn’t seem to work.How should I do?

if (interactive()) {
  list <- list(name = "Divad Nojnarg")
    ui = dashboardPage(
      navbar = dashboardHeader(
        rightUi = uiOutput("user"),
      sidebar = dashboardSidebar(),
      body = dashboardBody(),
      title = "bs4UserMenu"
    server = function(input, output) {
      output$user <- renderUI({
          name = list$name, 
          status = "primary",
          src = "", 
          title = "bs4Dash",
          subtitle = "Author", 
          footer = p("The footer", class = "text-center"),
          "This is the menu content."

What database? There is no database here.

I have solved it, thanks. :grinning:

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.