TheShopCritics2/TSC2/Components/Layout/MainLayout.razor.cs

26 lines
818 B
C#
Raw Normal View History

2024-08-05 17:13:29 +00:00
namespace TSC2.Components.Layout
{
public partial class MainLayout
{
public static string Greeting = "Hello, {}";
public string ClientId = CSharp.Credentials.GoogleClientId;
public string ClientSecret = CSharp.Credentials.GoogleClientSecret;
public static string Redirect = "https://localhost:7282/signin-google";
public static Dictionary<string, string> Session = new Dictionary<string, string>();
public static void UpdateGreeting()
{
if (Session.Count == 0)
{
return;
}
// This should only execute if the user is signed in AND is the first render
Greeting = "Hello, " + Session["name"];
Console.Out.WriteLine("Updated greeting");
}
}
}