From 3f3b9d0b9e719a13ba80a1bd01045b84cddf5755 Mon Sep 17 00:00:00 2001 From: pantonshire Date: Thu, 15 Jun 2023 14:34:34 +0100 Subject: [PATCH] only display table if it has a nonzero number of rows --- src/components/output_table.tsx | 56 +++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/src/components/output_table.tsx b/src/components/output_table.tsx index 6f162ff..fb4b4ef 100644 --- a/src/components/output_table.tsx +++ b/src/components/output_table.tsx @@ -67,32 +67,42 @@ export function OutputTable(props: { currentString: string }) { } } + let table; + + if (rows.length > 0) { + table = ( + + + + + + + + + + + + + + + + + + + + + {rows} + +
NameCodeUTF-8UTF-16LECategoryCombiningBidirectionalMirroredDecompUpperLowerTitleNumeric
+ ); + } else { + table = (<>); + } + return (
- - - - - - - - - - - - - - - - - - - - - {rows} - -
NameCodeUTF-8UTF-16LECategoryCombiningBidirectionalMirroredDecompUpperLowerTitleNumeric
+ {table}
);