style: styling on users posts and posts. chore: add todos

This commit is contained in:
Stevan Freeborn
2023-09-11 14:03:55 -05:00
parent 667bb089f5
commit 82900a6619
3 changed files with 13 additions and 8 deletions
+5 -1
View File
@@ -17,8 +17,12 @@ export default function Post({ post }: { post: PostWithUserDto }) {
// and we should display a 'more' link to load the post
// in an individual page
// TODO: Add menu button
// TODO: Add reply and like buttons
return (
<div className='flex w-full h-full gap-4 p-8 bg-white dark:bg-secondary-gray border border-gray-600'>
<div className='flex w-full h-full gap-4 p-8 bg-white dark:bg-secondary-gray'>
<div>
<Image
alt='user profile image'
+5 -3
View File
@@ -21,10 +21,12 @@ export default function UserPosts({ user }: { user: UserDto }) {
return (
<div className='flex flex-col items-center w-full h-full'>
{postsWithUser.map(post => (
<Post
<div
key={post._id}
post={post}
/>
className='w-full h-full border border-b-0 border-gray-600 last:border-b'
>
<Post post={post} />
</div>
))}
{pager.isLoading ? (
<div className='flex items-center gap-2 p-5'>
+3 -4
View File
@@ -1,7 +1,6 @@
import { UserDto } from '@/app/types';
import Image from 'next/image';
import { AiFillCalendar } from 'react-icons/ai';
import { Doc, Id } from '../../convex/_generated/dataModel';
import { UserDto } from '@/app/types';
export default function UserProfile({ user }: { user: UserDto }) {
const username = user.clerkUsername ?? user._id;
@@ -24,7 +23,7 @@ export default function UserProfile({ user }: { user: UserDto }) {
className='rounded-full object-cover border-4 border-primary-accent'
/>
</div>
<div>
<div className='text-white'>
<h1 className='font-bold'>{username}</h1>
<div className='flex gap-2 items-center text-sm'>
<AiFillCalendar className='w-4 h-4' />
@@ -33,7 +32,7 @@ export default function UserProfile({ user }: { user: UserDto }) {
</div>
</div>
</div>
<div className='h-[50px] bg-white dark:bg-primary-gray pl-5 pr-40 border border-gray-600'></div>
<div className='h-[50px] bg-white dark:bg-primary-gray pl-5 pr-40 border border-gray-600 border-b-0'></div>
</div>
);
}