Changed icons to jsx format
This commit is contained in:
@@ -94,7 +94,7 @@ export default function CommunityPage() {
|
|||||||
{
|
{
|
||||||
communityList.map((post) => {
|
communityList.map((post) => {
|
||||||
return (
|
return (
|
||||||
<section className="mb-7 flex flex-row bg-red-50 border border-none rounded-2xl">
|
<section className="mb-7 flex flex-row bg-red-50 border border-none rounded-2xl" key={post.id}>
|
||||||
<div className="pl-7 pr-3 pt-5">
|
<div className="pl-7 pr-3 pt-5">
|
||||||
<Avatar src="https://pbs.twimg.com/media/GOva9x5a0AAK8Bn?format=jpg&name=large" size="lg" />
|
<Avatar src="https://pbs.twimg.com/media/GOva9x5a0AAK8Bn?format=jpg&name=large" size="lg" />
|
||||||
</div>
|
</div>
|
||||||
@@ -116,17 +116,16 @@ export default function CommunityPage() {
|
|||||||
<div>
|
<div>
|
||||||
<DropdownTrigger className="justify-center items-center">
|
<DropdownTrigger className="justify-center items-center">
|
||||||
<Button isIconOnly className="w-full h-3/5 justify-center items-center" variant="light">
|
<Button isIconOnly className="w-full h-3/5 justify-center items-center" variant="light">
|
||||||
<svg
|
<svg xmlns="http://www.w3.org/2000/svg"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
fill="none"
|
fill="none"
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
stroke-width="1.5"
|
strokeWidth={1.5}
|
||||||
stroke="currentColor"
|
stroke="currentColor"
|
||||||
className="size-6">
|
className="size-6">
|
||||||
|
|
||||||
<path
|
<path
|
||||||
stroke-linecap="round"
|
strokeLinecap="round"
|
||||||
stroke-linejoin="round"
|
strokeLinejoin="round"
|
||||||
d="M6.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM12.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM18.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z" />
|
d="M6.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM12.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM18.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z" />
|
||||||
</svg>
|
</svg>
|
||||||
</Button>
|
</Button>
|
||||||
@@ -150,7 +149,7 @@ export default function CommunityPage() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p className="">
|
<p>
|
||||||
{post.content}
|
{post.content}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -189,17 +188,16 @@ export default function CommunityPage() {
|
|||||||
<p>Create a post!</p>
|
<p>Create a post!</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<svg
|
<svg xmlns="http://www.w3.org/2000/svg"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
fill="none"
|
fill="none"
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
stroke-width="1.7"
|
strokeWidth={1.7}
|
||||||
stroke="currentColor"
|
stroke="currentColor"
|
||||||
className="size-5">
|
className="size-5">
|
||||||
|
|
||||||
<path
|
<path
|
||||||
stroke-linecap="round"
|
strokeLinecap="round"
|
||||||
stroke-linejoin="round"
|
strokeLinejoin="round"
|
||||||
d="M12 4.5v15m7.5-7.5h-15" />
|
d="M12 4.5v15m7.5-7.5h-15" />
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
@@ -218,18 +216,17 @@ export default function CommunityPage() {
|
|||||||
onKeyDown={onSearchKeyDown}
|
onKeyDown={onSearchKeyDown}
|
||||||
/>
|
/>
|
||||||
<Button isIconOnly className="bg-red-color">
|
<Button isIconOnly className="bg-red-color">
|
||||||
<svg
|
<svg xmlns="http://www.w3.org/2000/svg"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
fill="none"
|
fill="none"
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
stroke-width="1.5"
|
strokeWidth={1.5}
|
||||||
stroke="currentColor"
|
stroke="currentColor"
|
||||||
className="size-6 bg-red-color text-white"
|
className="size-6 bg-red-color text-white"
|
||||||
onClick={onClickSearch}>
|
onClick={onClickSearch}>
|
||||||
|
|
||||||
<path
|
<path
|
||||||
stroke-linecap="round"
|
strokeLinecap="round"
|
||||||
stroke-linejoin="round"
|
strokeLinejoin="round"
|
||||||
d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" />
|
d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" />
|
||||||
</svg>
|
</svg>
|
||||||
</Button>
|
</Button>
|
||||||
@@ -238,14 +235,14 @@ export default function CommunityPage() {
|
|||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
fill="none"
|
fill="none"
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
stroke-width="1.5"
|
strokeWidth={1.5}
|
||||||
stroke="currentColor"
|
stroke="currentColor"
|
||||||
className="size-6 text-white"
|
className="size-6 text-white"
|
||||||
onClick={onClickClear}>
|
onClick={onClickClear}>
|
||||||
|
|
||||||
<path
|
<path
|
||||||
stroke-linecap="round"
|
strokeLinecap="round"
|
||||||
stroke-linejoin="round"
|
strokeLinejoin="round"
|
||||||
d="M6 18 18 6M6 6l12 12" />
|
d="M6 18 18 6M6 6l12 12" />
|
||||||
</svg>
|
</svg>
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -30,10 +30,10 @@ function CreatePostPage() {
|
|||||||
tags: ''
|
tags: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSubmit = async (values: any, { setSubmitting, resetForm , setFieldError }: any) => {
|
const handleSubmit = async (values: any, { setSubmitting, resetForm, setFieldError }: any) => {
|
||||||
try {
|
try {
|
||||||
const response = await axios
|
const response = await axios
|
||||||
.post(config.serverAddress + '/post', values); // Assuming an API route
|
.post(config.serverAddress + '/post', values); // Assuming an API route
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
console.log('Post created successfully:', response.data);
|
console.log('Post created successfully:', response.data);
|
||||||
resetForm(); // Clear form after successful submit
|
resetForm(); // Clear form after successful submit
|
||||||
@@ -56,18 +56,18 @@ function CreatePostPage() {
|
|||||||
<DefaultLayout>
|
<DefaultLayout>
|
||||||
<section className="w-8/12 mx-auto">
|
<section className="w-8/12 mx-auto">
|
||||||
<Link href="/community">
|
<Link href="/community">
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
fill="none"
|
fill="none"
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
stroke-width="1.5"
|
strokeWidth={1.5}
|
||||||
stroke="black"
|
stroke="black"
|
||||||
className="size-5">
|
className="size-5">
|
||||||
|
|
||||||
<path
|
<path
|
||||||
stroke-linecap="round"
|
strokeLinecap="round"
|
||||||
stroke-linejoin="round"
|
strokeLinejoin="round"
|
||||||
d="M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3" />
|
d="M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3" />
|
||||||
</svg>
|
</svg>
|
||||||
</Link>
|
</Link>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -89,15 +89,14 @@ function editPost() {
|
|||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
fill="none"
|
fill="none"
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
stroke-width="1.5"
|
strokeWidth={1.5}
|
||||||
stroke="black"
|
stroke="black"
|
||||||
className="size-5"
|
className="size-5">
|
||||||
>
|
|
||||||
<path
|
<path
|
||||||
stroke-linecap="round"
|
strokeLinecap="round"
|
||||||
stroke-linejoin="round"
|
strokeLinejoin="round"
|
||||||
d="M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3"
|
d="M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3" />
|
||||||
/>
|
|
||||||
</svg>
|
</svg>
|
||||||
</Link>
|
</Link>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user