Skip to content

Build your personal knowledge base with Trilium Notes

fix(react/widgets): unnecessary padding due to SQL schemas

Elian Doran703cf8434a00
diff --git a/apps/client/src/widgets/sql_table_schemas.tsx b/apps/client/src/widgets/sql_table_schemas.tsx
index a72eabc524..3605c2f956 100644
--- a/apps/client/src/widgets/sql_table_schemas.tsx
+++ b/apps/client/src/widgets/sql_table_schemas.tsx
@@ -14,9 +14,10 @@ export default function SqlTableSchemas() {
server.get<SchemaResponse[]>("sql/schema").then(setSchemas);
}, []);
+ const isEnabled = note?.mime === "text/x-sqlite;schema=trilium" && schemas;
return (
- <div className="sql-table-schemas-widget">
- {note?.mime === "text/x-sqlite;schema=trilium" && schemas && (
+ <div className={`sql-table-schemas-widget ${!isEnabled ? "hidden-ext" : ""}`}>
+ {isEnabled && (
<>
{t("sql_table_schemas.tables")}{": "}