added rankings but ugly and tired
This commit is contained in:
15
source/components/MemoSection.js
Normal file
15
source/components/MemoSection.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import React from 'react';
|
||||
import { Box, Text } from 'ink';
|
||||
|
||||
export function MemoSection({ latestMemo, width, height }) {
|
||||
const lines = latestMemo.split('\n');
|
||||
const maxLines = Math.max(height - 28, 4);
|
||||
return (
|
||||
<Box flexDirection="column" marginTop={1} width={width}>
|
||||
<Text color="magenta">Liste de courses</Text>
|
||||
{lines.slice(0, maxLines).map((line, index) => (
|
||||
<Text key={index} wrap="truncate-end">{line}</Text>
|
||||
))}
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user