fix: Disable Notion import when env is not available (#8761)

This commit is contained in:
Tom Moor authored and GitHub committed 2025-03-24 02:52:54 +00:00
1 parent 40278b2d9a
commit bdb34a202c
2 files changed
+7 -2

No files matched your search

+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()