reverse list

This commit is contained in:
2023-03-16 23:43:49 +08:00
parent 1c8a3e1462
commit bebb447498

View File

@@ -91,7 +91,13 @@ export function App() {
NEW
</button>
<ul>
{allChatStore.map((cs, i) => (
{allChatStore
.slice()
.reverse()
.map((cs, _i) => {
// reverse
const i = allChatStore.length - _i - 1;
return (
<li>
<button
className={`w-full my-1 p-1 rounded hover:bg-blue-300 ${
@@ -104,7 +110,8 @@ export function App() {
{i}
</button>
</li>
))}
);
})}
</ul>
</div>
<button