Compare commits

...

1 Commits

Author SHA1 Message Date
Tom Moor 77c81820a6 fix: Disable Notion import when env is not available 2025-03-23 22:48:33 -04:00
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -81,7 +81,12 @@ export const Notion = observer(() => {
}, [t, appName, oauthError]);
return (
<Button type="submit" onClick={() => redirectTo(authUrl)} neutral>
<Button
type="submit"
onClick={() => redirectTo(authUrl)}
disabled={!env.NOTION_CLIENT_ID}
neutral
>
{t("Import")}
</Button>
);
+1 -1
View File
@@ -5,8 +5,8 @@ import environment from "@server/utils/environment";
import { CannotUseWithout } from "@server/utils/validators";
class NotionPluginEnvironment extends Environment {
@IsOptional()
@Public
@IsOptional()
public NOTION_CLIENT_ID = this.toOptionalString(environment.NOTION_CLIENT_ID);
@IsOptional()