mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
fix(react/widgets): unnecessary padding due to SQL schemas
This commit is contained in:
@@ -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")}{": "}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user