Skip to content

Scheduling infrastructure for absolutely everyone.

Avoid theme not ready causing the select to not render (#7194)

Hariom Balharad7b4d5932d87
diff --git a/apps/web/components/ui/form/Select.tsx b/apps/web/components/ui/form/Select.tsx
index 2005ab60a0b..d035a5beee5 100644
--- a/apps/web/components/ui/form/Select.tsx
+++ b/apps/web/components/ui/form/Select.tsx
@@ -29,7 +29,7 @@ function Select<
IsMulti extends boolean = false,
Group extends GroupBase<Option> = GroupBase<Option>
>({ className, ...props }: SelectProps<Option, IsMulti, Group>) {
- const { resolvedTheme, forcedTheme, isReady } = useTheme();
+ const { resolvedTheme, forcedTheme /*isReady*/ } = useTheme();
const hasDarkTheme = !forcedTheme && resolvedTheme === "dark";
const darkThemeColors = {
/** Dark Theme starts */
@@ -74,9 +74,9 @@ function Select<
};
// Till we know in JS the theme is ready, we can't render react-select as it would render with light theme instead
- if (!isReady) {
- return <input type="text" className={className} />;
- }
+ // if (!isReady) {
+ // return <input type="text" className={className} />;
+ // }
return (
<ReactSelect
theme={(theme) => ({