Apps (Dashboards) are blank after upgrading from 2.12 to 4.09

This is probably an easy fix but I’m not sure where to start. I don’t see anything obvious in the logs and I’m not a web dev so the skill set is limited. The header shows up just nothing in the body. Here is the code of one ‘App’ that is not displaying. Any help is appreciated.

$UDScriptRoot = $PSScriptRoot
$assets = "$((get-item $UDScriptRoot).parent.parent.Fullname)\assets"
. $assets/Navigation.ps1
$null, $Menu = $Navigation
$Pages = @()
$Pages += New-UDPage -Name 'Dashboard Home' -Content {
    New-UDStyle -Style '
    margin: auto;
    display: block;
    width: 35%;
    ' -Content {
        New-UDImage -Id 'imgLogo' -Url '/assets/watlogo1.png' -Height 100 -Width 400
    }
    $Header = New-UDCardHeader -Title 'Available Dashboards'
    $Body = New-UDCardBody -Content {
        New-UDList -Content {
            Foreach($i in $Menu) {
                $i
            }
        }
    }
    $Footer = New-UDCardFooter -Content {
        If ($Roles -contains "Administrator") {
            New-UDListItem -Label "Administration" -Icon (New-UDIcon -Icon 'tools' -Size 2x) -OnClick { Invoke-UDRedirect "$DBUrl/admin" -OpenInNewWindow }  
        }    
    }
    New-UDCard -Body $Body -Header $Header -Footer $Footer -Style @{
        'text-align' = 'center;'
        'margin' = 'auto;'
        'display' = 'block;'
        'width' = '35%;'
    }
} -NavigationLayout Temporary -Navigation $Navigation

New-UDDashboard -Title "Dashboard Home" -Pages $Pages
Product: PowerShell Universal
Version: 14.09

I figured it out. The problem was the PSCredential variables. I had to change the variable names to use the $Secret scope. $Secret:MyCredential instead of $MyCredential. It must have been a change of which I was unaware.