squash a bunch of commits
This commit is contained in:
24
Shogi.UI/Pages/Home/Account/LocalStorageExtensions.cs
Normal file
24
Shogi.UI/Pages/Home/Account/LocalStorageExtensions.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Shogi.UI.Shared;
|
||||
|
||||
namespace Shogi.UI.Pages.Home.Account
|
||||
{
|
||||
public static class LocalStorageExtensions
|
||||
{
|
||||
private const string AccountPlatform = "AccountPlatform";
|
||||
|
||||
public static Task<WhichAccountPlatform?> GetAccountPlatform(this ILocalStorage self)
|
||||
{
|
||||
return self.Get<WhichAccountPlatform>(AccountPlatform).AsTask();
|
||||
}
|
||||
|
||||
public static Task SetAccountPlatform(this ILocalStorage self, WhichAccountPlatform platform)
|
||||
{
|
||||
return self.Set(AccountPlatform, platform.ToString()).AsTask();
|
||||
}
|
||||
|
||||
public static Task DeleteAccountPlatform(this ILocalStorage self)
|
||||
{
|
||||
return self.Delete(AccountPlatform).AsTask();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user