@@ -25,7 +25,7 @@ export default function BlockSpawner() {
2525 const spawnBlock = useCallback ( async ( ) => {
2626 const id = blockNumRef . current ++
2727
28- setBlocks ( ( prev ) => [ ... prev , { id, state : 'proposed' } ] )
28+ setBlocks ( ( prev ) => [ { id, state : 'proposed' } , ... prev ] )
2929
3030 await sleep ( 100 * speed )
3131 updateBlockState ( id , 'voted' )
@@ -46,9 +46,9 @@ export default function BlockSpawner() {
4646 'px-4 py-3 rounded-md font-semibold text-sm text-center animate-slideIn transition-all duration-300 bg-linear-to-br'
4747
4848 return (
49- < div className = "w-full p-6" >
49+ < div className = "w-full p-6 max-md:p-0 max-sm:flex-1 max-sm:flex max-sm:flex-col max-sm:min-h-0 " >
5050 { /* Controls */ }
51- < div className = "flex items-center gap-4 mb-8 p-4 bg-[#1a1a2e] rounded-lg flex-wrap" >
51+ < div className = "flex items-center gap-4 mb-8 p-4 bg-[#1a1a2e] rounded-lg flex-wrap max-md:p-3 max-md:gap-3 max-md:mb-2 max-sm:shrink-0 " >
5252 < label htmlFor = "speed" className = "text-[#a0a0b0] font-medium" >
5353 Speed:
5454 </ label >
@@ -66,20 +66,20 @@ export default function BlockSpawner() {
6666 < button
6767 type = "button"
6868 onClick = { spawnBlock }
69- className = "ml-auto px-6 py-3 bg-linear-to-br from-indigo-500 to-violet-500 text-white border-none rounded-md font-semibold cursor-pointer transition-all duration-150 hover:-translate-y-0.5 hover:shadow-lg hover:shadow-indigo-500/40 active:translate-y-0 max-sm:w-full max-sm:ml-0 max-sm:mt-2"
69+ className = "ml-auto px-6 py-3 bg-linear-to-br from-indigo-500 to-violet-500 text-white border-none rounded-md font-semibold cursor-pointer transition-all duration-150 hover:-translate-y-0.5 hover:shadow-lg hover:shadow-indigo-500/40 active:translate-y-0 max-sm:w-full max-sm:ml-0 max-sm:mt-2 max-sm:px-4 max-sm:py-2 "
7070 >
7171 Spawn Block
7272 </ button >
7373 </ div >
7474
7575 { /* Lanes */ }
76- < div className = "grid grid-cols-4 gap-4 max-md :grid-cols-2 max-sm:grid-cols-1 " >
76+ < div className = "grid grid-cols-4 gap-4 max-sm :grid-cols-2 max-sm:grid-rows-[1fr_1fr] max-sm:flex-1 max-sm:min-h-0 max-md:gap-2 " >
7777 { /* Proposed Lane */ }
78- < div className = "bg-[#16162a] rounded-lg p-4 min-h-75" >
79- < h3 className = "m-0 mb-4 pb-3 border-b-2 border-[#2a2a4a] text-sm uppercase tracking-wide text-[#8888a0]" >
78+ < div className = "bg-[#16162a] rounded-lg p-4 min-h-75 max-md:min-h-0 max-md:flex max-md:flex-col max-md:overflow-hidden max-md:p-3 " >
79+ < h3 className = "m-0 mb-4 pb-3 border-b-2 border-[#2a2a4a] text-sm font-medium uppercase tracking-wide text-[#8888a0] max-md:pb-2 max-sm:shrink-0 " >
8080 Proposed
8181 </ h3 >
82- < div className = "flex flex-col gap-2" >
82+ < div className = "flex flex-col gap-2 max-md:overflow-auto max-md:flex-1 max-md:min-h-0 " >
8383 { proposedBlocks . map ( ( block ) => (
8484 < div
8585 key = { block . id }
@@ -92,11 +92,11 @@ export default function BlockSpawner() {
9292 </ div >
9393
9494 { /* Voted Lane */ }
95- < div className = "bg-[#16162a] rounded-lg p-4 min-h-75" >
96- < h3 className = "m-0 mb-4 pb-3 border-b-2 border-[#2a2a4a] text-sm uppercase tracking-wide text-[#8888a0]" >
95+ < div className = "bg-[#16162a] rounded-lg p-4 min-h-75 max-md:min-h-0 max-md:flex max-md:flex-col max-md:overflow-hidden max-md:p-3 " >
96+ < h3 className = "m-0 mb-4 pb-3 border-b-2 border-[#2a2a4a] text-sm font-medium uppercase tracking-wide text-[#8888a0] max-md:pb-2 max-sm:shrink-0 " >
9797 Voted
9898 </ h3 >
99- < div className = "flex flex-col gap-2" >
99+ < div className = "flex flex-col gap-2 max-md:overflow-auto max-md:flex-1 max-md:min-h-0 " >
100100 { votedBlocks . map ( ( block ) => (
101101 < div
102102 key = { block . id }
@@ -109,11 +109,11 @@ export default function BlockSpawner() {
109109 </ div >
110110
111111 { /* Finalized Lane */ }
112- < div className = "bg-[#16162a] rounded-lg p-4 min-h-75" >
113- < h3 className = "m-0 mb-4 pb-3 border-b-2 border-[#2a2a4a] text-sm uppercase tracking-wide text-[#8888a0]" >
112+ < div className = "bg-[#16162a] rounded-lg p-4 min-h-75 max-md:min-h-0 max-md:flex max-md:flex-col max-md:overflow-hidden max-md:p-3 " >
113+ < h3 className = "m-0 mb-4 pb-3 border-b-2 border-[#2a2a4a] text-sm font-medium uppercase tracking-wide text-[#8888a0] max-md:pb-2 max-sm:shrink-0 " >
114114 Finalized
115115 </ h3 >
116- < div className = "flex flex-col gap-2" >
116+ < div className = "flex flex-col gap-2 max-md:overflow-auto max-md:flex-1 max-md:min-h-0 " >
117117 { finalizedBlocks . map ( ( block ) => (
118118 < div
119119 key = { block . id }
@@ -126,11 +126,11 @@ export default function BlockSpawner() {
126126 </ div >
127127
128128 { /* Verified Lane */ }
129- < div className = "bg-[#16162a] rounded-lg p-4 min-h-75" >
130- < h3 className = "m-0 mb-4 pb-3 border-b-2 border-[#2a2a4a] text-sm uppercase tracking-wide text-[#8888a0]" >
129+ < div className = "bg-[#16162a] rounded-lg p-4 min-h-75 max-md:min-h-0 max-md:flex max-md:flex-col max-md:overflow-hidden max-md:p-3 " >
130+ < h3 className = "m-0 mb-4 pb-3 border-b-2 border-[#2a2a4a] text-sm font-medium uppercase tracking-wide text-[#8888a0] max-md:pb-2 max-sm:shrink-0 " >
131131 Verified
132132 </ h3 >
133- < div className = "flex flex-col gap-2" >
133+ < div className = "flex flex-col gap-2 max-md:overflow-auto max-md:flex-1 max-md:min-h-0 " >
134134 { verifiedBlocks . map ( ( block ) => (
135135 < div
136136 key = { block . id }
0 commit comments