Skip to content

Commit

Permalink
bug fixing : added render
Browse files Browse the repository at this point in the history
  • Loading branch information
nuoxoxo committed Dec 13, 2023
1 parent ec162ca commit b6a15b6
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/includes/Aoc2313.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ var Aoc2313 = () => {

useEffect(() => {
Planner()
Renderer()
}, [Coors,B,C])

const Planner = () => {
Expand Down Expand Up @@ -165,6 +166,10 @@ var Aoc2313 = () => {
return index
}

const Renderer = () => {
return combinedArrays
}

const combinedArrays = A.map((elemA, i) => {
elemA = [Array(elemA[0].length).fill([' ']), Array(elemA[0].length).fill([' ']), ...elemA]
// 👆 unshift 2 blank lines now the left block (which is the orignal block) looks better
Expand All @@ -173,7 +178,13 @@ var Aoc2313 = () => {

// Return JSX or components if you want to render them
return (
<div key={i} style={{display:'flex',flexDirection:'row',justifyContent:'center',alignContent:'center',paddingBottom:'21px'}}>
<div key={i} style={{
display:'flex',
flexDirection:'row',
justifyContent:'center',
alignContent:'center',
paddingBottom:'21px'
}}>
<div>{elemA.map((row)=>row.join('')).join('\n')}</div>
<div>{elemB.map((row)=>row.join('')).join('\n')}</div>
<div>{elemC.map((row)=>row.join('')).join('\n')}</div>
Expand Down

0 comments on commit b6a15b6

Please sign in to comment.