9f4d5e13aa
* Add CLN node to docker-compose.yml * Attach CLN wallet via CLNRest * Remove leading space * Implement autowithdrawal to CLN in worker * Fix UnhandledSchemeError during build See https://github.com/vercel/next.js/discussions/33982 * Refactor CLN invoice code into @/lib/cln * Fix missing env vars * Fix validation error if rune invalid * Update header * Add rune placeholder * Fix missing expiry for test invoice * Remove nonsensical comment * Remove unnecessary async * Show level SUCCESS as OK in logs * Add stacker_cln commands to sndev * fix sndev posix compliance, add cln_withdraw * give stacker_cln larger channels --------- Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com> Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
16 lines
643 B
JavaScript
16 lines
643 B
JavaScript
import { timeSince } from '@/lib/time'
|
|
import styles from './log-message.module.css'
|
|
|
|
export default function LogMessage ({ wallet, level, message, ts }) {
|
|
level = level.toLowerCase()
|
|
const levelClassName = ['ok', 'success'].includes(level) ? 'text-success' : level === 'error' ? 'text-danger' : level === 'info' ? 'text-info' : ''
|
|
return (
|
|
<tr className={styles.line}>
|
|
<td className={styles.timestamp}>{timeSince(new Date(ts))}</td>
|
|
<td className={styles.wallet}>[{wallet}]</td>
|
|
<td className={`${styles.level} ${levelClassName}`}>{level === 'success' ? 'ok' : level}</td>
|
|
<td>{message}</td>
|
|
</tr>
|
|
)
|
|
}
|