Skip to content

Commit 9cbe040

Browse files
committed
Got Rid of Multi-Render Problem
1 parent a655209 commit 9cbe040

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

src/components/Application.tsx

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -390,22 +390,6 @@ const Application = () => {
390390
className="flex flex-wrap w-full "
391391
key={analyzedString.characterString}
392392
>
393-
<div className="w-full items-center justify-around p-5 ">
394-
{/* title called "grapheme component names" */}
395-
<h1 className="text-2xl font-bold flex">Grapheme Component Names</h1>
396-
</div>
397-
<div className="w-full flex items-center flex-wrap justify-start p-5 pb-10">
398-
{/* map the names list to a list of <li> elements */}
399-
<ol className="w-full flex flex-wrap">
400-
{graphemeNameString[index].map((name, idx) => (
401-
<div className="w-full md:w-1/3 lg:w-1/4 pl-1 pb-4" key={idx}>
402-
<li value={idx + 1}>
403-
{idx + 1}.{name}
404-
</li>
405-
</div>
406-
))}
407-
</ol>
408-
</div>
409393
<div className="w-full">Grapheme # : {analyzedString.grapheme}</div>
410394
<div className="w-full">
411395
Code point at Position {analyzedString.position} : U+
@@ -1373,6 +1357,27 @@ const Application = () => {
13731357
</div>
13741358
)}
13751359
</div>
1360+
<div className="w-full items-center justify-around p-5 ">
1361+
{/* title called "grapheme component names" */}
1362+
<h1 className="text-2xl font-bold flex">
1363+
Grapheme Component Names
1364+
</h1>
1365+
</div>
1366+
<div className="w-full flex items-center flex-wrap justify-start p-5 pb-10">
1367+
{/* map the names list to a list of <li> elements */}
1368+
<ol className="w-full flex flex-wrap">
1369+
{(graphemeNameString[index] || []).map((name, idx) => (
1370+
<div
1371+
className="w-full md:w-1/3 lg:w-1/4 pl-1 pb-4"
1372+
key={idx}
1373+
>
1374+
<li value={idx + 1}>
1375+
{idx + 1}.{name}
1376+
</li>
1377+
</div>
1378+
))}
1379+
</ol>
1380+
</div>
13761381
{utfVersion === 'utf-8' &&
13771382
stringAnalyzed[index].map((stringAnalyzed2, code_point) => {
13781383
//Analyze Panel, Displaying the stringAnalyzed

0 commit comments

Comments
 (0)