Skip to content

Commit 2d72c10

Browse files
authored
Refactor ExportDialog: Remove discourseGraphEnabled state and simplify FormGroup visibility logic. Set includeDiscourseContext to false by default. (#139)
1 parent c8b8915 commit 2d72c10

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

apps/roam/src/components/Export.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,7 @@ const ExportDialog: ExportDialogComponent = ({
161161
useEffect(() => {
162162
if (initialPanel === "export") setSelectedTabId("export");
163163
}, [initialPanel]);
164-
const [discourseGraphEnabled, setDiscourseGraphEnabled] = useState(() => {
165-
return getExtensionAPI().settings.get("discourse-graphs");
166-
});
167-
const [includeDiscourseContext, setIncludeDiscourseContext] = useState(
168-
discourseGraphEnabled as boolean,
169-
);
164+
const [includeDiscourseContext, setIncludeDiscourseContext] = useState(false);
170165
const [gitHubAccessToken, setGitHubAccessToken] = useState<string | null>(
171166
getSetting<string | null>("oauth-github", null),
172167
);
@@ -554,10 +549,7 @@ const ExportDialog: ExportDialogComponent = ({
554549
: `Exporting ${results.length} results`}
555550
</span>
556551
<div className="flex flex-col items-end">
557-
<FormGroup
558-
className={`m-0 ${discourseGraphEnabled ? "" : "hidden"}`}
559-
inline
560-
>
552+
<FormGroup className={`m-0`} inline>
561553
<Checkbox
562554
alignIndicator={"right"}
563555
checked={includeDiscourseContext}

0 commit comments

Comments
 (0)