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