Redundant conditional expression (#2894)

* remove redundant conditional expressions

* remove redundant conditional expressions
This commit is contained in:
Hashen
2022-05-26 16:41:05 +00:00
committed by GitHub
parent 24a3bfdf78
commit 6940c8d6cc
3 changed files with 6 additions and 12 deletions
+2 -4
View File
@@ -337,11 +337,9 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
weekStart: "Sunday",
brandColor: "",
darkBrandColor: "",
allowDynamicBooking: users.some((user) => {
allowDynamicBooking: !users.some((user) => {
return !user.allowDynamicBooking;
})
? false
: true,
}),
}
: {
name: user.name || user.username,
+2 -4
View File
@@ -307,11 +307,9 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
weekStart: "Sunday",
brandColor: "",
darkBrandColor: "",
allowDynamicBooking: users.some((user) => {
allowDynamicBooking: !users.some((user) => {
return !user.allowDynamicBooking;
})
? false
: true,
}),
}
: {
name: user.name || user.username,
+2 -4
View File
@@ -200,11 +200,9 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
theme: null,
brandColor: "",
darkBrandColor: "",
allowDynamicBooking: users.some((user) => {
allowDynamicBooking: !users.some((user) => {
return !user.allowDynamicBooking;
})
? false
: true,
}),
eventName: getDynamicEventName(dynamicNames, eventTypeSlug),
}
: {