diff --git a/Client/reasn-client/apps/web/app/events/[slug]/page.tsx b/Client/reasn-client/apps/web/app/events/[slug]/page.tsx index deb47f1..69d6f5a 100644 --- a/Client/reasn-client/apps/web/app/events/[slug]/page.tsx +++ b/Client/reasn-client/apps/web/app/events/[slug]/page.tsx @@ -2,7 +2,7 @@ import { MOCK_IMG_URL } from "@reasn/ui/src/components/shared/Card"; import { ButtonBase } from "@reasn/ui/src/components/shared/form"; -import { Comment } from "@reasn/ui/src/components/shared/Comment"; +import { Comment, NewComment } from "@reasn/ui/src/components/shared/Comment"; import { useEffect, useRef, useState } from "react"; import { ArrowLeft, @@ -271,6 +271,7 @@ const EventPage = ({ params }: { params: { slug: string } }) => {

Komentarze:

+ diff --git a/Client/reasn-client/packages/ui/src/components/shared/Comment.tsx b/Client/reasn-client/packages/ui/src/components/shared/Comment.tsx index c2bceb9..a979009 100644 --- a/Client/reasn-client/packages/ui/src/components/shared/Comment.tsx +++ b/Client/reasn-client/packages/ui/src/components/shared/Comment.tsx @@ -3,12 +3,13 @@ import { CommentDto, CommentDtoMapper, } from "@reasn/common/src/schemas/CommentDto"; +import { ButtonBase, FloatingTextarea } from "./form"; interface CommentProps { - comment: CommentDto; + comment?: CommentDto; } -export const Comment = () => { +export const Comment = (props: CommentProps) => { const comment = CommentDtoMapper.fromObject({ EventId: 1, Content: @@ -36,3 +37,16 @@ export const Comment = () => {
); }; + +export const NewComment = () => { + return ( +
+ + +
+ ); +}; diff --git a/Client/reasn-client/packages/ui/src/components/shared/form/Dropdown.tsx b/Client/reasn-client/packages/ui/src/components/shared/form/Dropdown.tsx index 834786d..6a2ddb7 100644 --- a/Client/reasn-client/packages/ui/src/components/shared/form/Dropdown.tsx +++ b/Client/reasn-client/packages/ui/src/components/shared/form/Dropdown.tsx @@ -1,3 +1,5 @@ +"use client"; + import React, { useEffect, useRef, useState } from "react"; import { FloatingInput } from "./Input"; import clsx from "clsx"; @@ -47,7 +49,7 @@ export const SearchMultiDropdown = (props: MultiDropdownProps) => { label={label} className="w-full rounded-b-none" defaultValue={search} - onChange={setSearch} + onChange={(e) => setSearch(e.target.value)} />
{selectedOptions.concat(filteredOptions).map((option) => ( diff --git a/Client/reasn-client/packages/ui/src/components/shared/index.tsx b/Client/reasn-client/packages/ui/src/components/shared/index.tsx index ab5033f..29d6008 100644 --- a/Client/reasn-client/packages/ui/src/components/shared/index.tsx +++ b/Client/reasn-client/packages/ui/src/components/shared/index.tsx @@ -2,5 +2,5 @@ export { Card, CardVariant } from "./Card"; export { Navbar } from "./Navbar"; export { Footer } from "./Footer"; export { Interest } from "./Interest"; -export { Comment } from "./Comment"; +export { Comment, NewComment } from "./Comment"; export { Toast } from "./Toast";