Skip to content

Commit

Permalink
adding img src
Browse files Browse the repository at this point in the history
  • Loading branch information
Osmait committed Nov 2, 2023
1 parent fa73fdd commit 7dde9a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { useRouter } from "next/navigation";
export const AuthValidation = () => {
const router = useRouter()
const setUser = useNotification((state) => state.setUser);

useEffect(() => {
const check = async () => {
const token = Cookies.get("x-token");
Expand Down
6 changes: 4 additions & 2 deletions FrontendRedSocial/red-social/app/components/compose-post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ import { UserImage } from "../../components/user-image";
import { PostButton } from "../../components/post-buttom";

import { Textarea } from "@nextui-org/input";
import { User } from "@/types";

type Props = {
img: string
postFrom: React.RefObject<HTMLFormElement>,
handlerSubmit: (e: React.FormEvent<HTMLFormElement>) => Promise<void>
}


export function ComposePost({ postFrom, handlerSubmit }: Props) {
export function ComposePost({ img, postFrom, handlerSubmit }: Props) {

return (
<form
Expand All @@ -20,7 +22,7 @@ export function ComposePost({ postFrom, handlerSubmit }: Props) {
className="flex flex-row p-3 border-b border-white/20"
>
<div className=" w-10 h-10 object-contain mr-4">
<UserImage />
<UserImage src={img} />
</div>
<div className="flex flex-1 flex-col gap-y-4">
<Textarea
Expand Down

0 comments on commit 7dde9a7

Please sign in to comment.