Save workspace changes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-15 11:20:49 -05:00
parent 556994a89d
commit 76dfc49b15
26 changed files with 4808 additions and 593 deletions

View File

@@ -1,18 +1,18 @@
import React from 'react'
import useAppStore from '../store/useAppStore'
import PostCard from './PostCard'
import React from 'react';
import useAppStore from '../store/useAppStore';
import PostCard from './PostCard';
const Feed: React.FC = () => {
const posts = useAppStore((s) => s.posts)
const sorted = [...posts].sort((a,b) => b.createdAt - a.createdAt)
if (sorted.length === 0) return <div className="card">No posts yet.</div>
const posts = useAppStore((s) => s.posts);
const sorted = [...posts].sort((a, b) => b.createdAt - a.createdAt);
if (sorted.length === 0) return <div className="card">No posts yet.</div>;
return (
<div>
{sorted.map((p) => (
<PostCard key={p.id} post={p} />
))}
</div>
)
}
);
};
export default Feed
export default Feed;