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

This commit is contained in:
Elian Doran 2025-08-29 22:45:20 +03:00
parent aa4375e25f
commit 703cf8434a
No known key found for this signature in database

View File

@ -14,9 +14,10 @@ export default function SqlTableSchemas() {
server.get<SchemaResponse[]>("sql/schema").then(setSchemas); server.get<SchemaResponse[]>("sql/schema").then(setSchemas);
}, []); }, []);
const isEnabled = note?.mime === "text/x-sqlite;schema=trilium" && schemas;
return ( return (
<div className="sql-table-schemas-widget"> <div className={`sql-table-schemas-widget ${!isEnabled ? "hidden-ext" : ""}`}>
{note?.mime === "text/x-sqlite;schema=trilium" && schemas && ( {isEnabled && (
<> <>
{t("sql_table_schemas.tables")}{": "} {t("sql_table_schemas.tables")}{": "}