diff --git a/components/post.tsx b/components/post.tsx index aed6488..0170a7b 100644 --- a/components/post.tsx +++ b/components/post.tsx @@ -4,32 +4,25 @@ import clsx from 'clsx' import React from 'react' import Link from 'next/link' import Image from 'next/image' -import dynamic from 'next/dynamic' import { ShareTwo } from '@icon-park/react' -import { genConfig } from 'react-nice-avatar' import { Bookmark, Heart, MessageCircle } from 'lucide-react' import { IPost } from '~/helpers/interfaces' import { Button } from '~/components/ui/button' import { Reaction } from '~/helpers/emoji-helpers' import { formatTimeDifference } from '~/helpers/format-time-diff' -import { defaultAvatarStyle } from '~/constant/default-avatar-style' import { convertHashtagsToLinks } from '~/helpers/convert-hashtags-to-link' import { Hashtag } from './hashtag' import { Carousel } from './carousel' import { ReactionButton } from './reaction-button' -const ReactNiceAvatar = dynamic(async () => await import('react-nice-avatar'), { ssr: false }) - type PostProps = { post: IPost isAuthor: boolean } export const Post = ({ post, isAuthor }: PostProps): JSX.Element => { - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument - const myConfig = genConfig(defaultAvatarStyle as any) const user = post.user const mediaFiles = post.mediaFiles const postHashtags = post.postHashtags @@ -58,12 +51,12 @@ export const Post = ({ post, isAuthor }: PostProps): JSX.Element => {
{/* User Avatar */} -
diff --git a/components/suggested-user-item.tsx b/components/suggested-user-item.tsx index 455d15b..8829461 100644 --- a/components/suggested-user-item.tsx +++ b/components/suggested-user-item.tsx @@ -1,8 +1,7 @@ import React from 'react' import Link from 'next/link' -import ReactNiceAvatar from 'react-nice-avatar' +import Image from 'next/image' -import { cn } from '~/lib/utils' import { IUser } from '~/helpers/interfaces' import { Button } from '~/components/ui/button' @@ -11,22 +10,23 @@ type SuggestedUserItemProps = { } export const SuggestedUserItem = (props: SuggestedUserItemProps): JSX.Element => { - const { username, displayName } = props.user + const { username, imageUrl, displayName } = props.user return (
  • -

    {username}

    - {displayName} + {displayName}