refactor(auth): remove apple login status
This commit is contained in:
@@ -24,7 +24,7 @@ describe("getInsufficientCreditsMessageLimitView", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it.each(["email", "facebook", "google", "apple"] as const)(
|
it.each(["email", "facebook", "google"] as const)(
|
||||||
"asks %s users to top up credits",
|
"asks %s users to top up credits",
|
||||||
(loginStatus) => {
|
(loginStatus) => {
|
||||||
expect(getInsufficientCreditsMessageLimitView(loginStatus)).toEqual({
|
expect(getInsufficientCreditsMessageLimitView(loginStatus)).toEqual({
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ describe("shouldShowFirstRechargeOfferBanner", () => {
|
|||||||
expect(
|
expect(
|
||||||
shouldShowFirstRechargeOfferBanner({
|
shouldShowFirstRechargeOfferBanner({
|
||||||
historyLoaded: true,
|
historyLoaded: true,
|
||||||
loginStatus: "apple",
|
loginStatus: "email",
|
||||||
isFirstRecharge: true,
|
isFirstRecharge: true,
|
||||||
dismissed: true,
|
dismissed: true,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ describe("isPrivateRoomAuthRequired", () => {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
it.each(["email", "facebook", "google", "apple"] as const)(
|
it.each(["email", "facebook", "google"] as const)(
|
||||||
"allows %s users to top up directly",
|
"allows %s users to top up directly",
|
||||||
(loginStatus) => {
|
(loginStatus) => {
|
||||||
expect(isPrivateRoomAuthRequired(loginStatus)).toBe(false);
|
expect(isPrivateRoomAuthRequired(loginStatus)).toBe(false);
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ export const LoginStatus = {
|
|||||||
Google: "google",
|
Google: "google",
|
||||||
/** 邮箱 + 密码登录 */
|
/** 邮箱 + 密码登录 */
|
||||||
Email: "email",
|
Email: "email",
|
||||||
/** Apple ID 登录 */
|
|
||||||
Apple: "apple",
|
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export type LoginStatus = (typeof LoginStatus)[keyof typeof LoginStatus];
|
export type LoginStatus = (typeof LoginStatus)[keyof typeof LoginStatus];
|
||||||
|
|||||||
@@ -284,7 +284,6 @@ function isBusinessLoginProvider(
|
|||||||
return (
|
return (
|
||||||
provider === "email" ||
|
provider === "email" ||
|
||||||
provider === "facebook" ||
|
provider === "facebook" ||
|
||||||
provider === "google" ||
|
provider === "google"
|
||||||
provider === "apple"
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user