package com.dklaw.gogo2.pages import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.itemsIndexed import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import com.dklaw.gogo2.database.Todo import com.dklaw.gogo2.database.getFakeTodo import java.time.format.DateTimeFormatter @Composable fun ContactsPage() { val todoList = getFakeTodo() Column(modifier = Modifier .fillMaxHeight() .padding(8.dp)) { LazyColumn( content = { itemsIndexed(todoList) { index : Int, item : Todo -> TodoItem(item = item) } } ) } } @Composable fun TodoItem(item : Todo) { val timeFormater : DateTimeFormatter = DateTimeFormatter.ofPattern("yyyy년 M월 d일 a h시 m분") val nowString = item.createdAt.format(timeFormater) Row { Column { Text(text = nowString) Text(text = item.title) } } }