diff --git a/public/robots.txt b/public/robots.txt index b98726a..5e344e4 100644 --- a/public/robots.txt +++ b/public/robots.txt @@ -3,7 +3,7 @@ User-agent: * Allow: / # Host -Host: https://nexmeet-lake.vercel.app +Host: https://www.nexmeet.social/ # Sitemaps -Sitemap: https://nexmeet-lake.vercel.app/sitemap.xml +Sitemap: https://www.nexmeet.social/sitemap.xml diff --git a/public/sitemap-0.xml b/public/sitemap-0.xml index f55713f..03ddf1e 100644 --- a/public/sitemap-0.xml +++ b/public/sitemap-0.xml @@ -1,14 +1,21 @@ -https://nexmeet-lake.vercel.app/add-event-space2024-10-10T15:56:05.518Zdaily0.7 -https://nexmeet-lake.vercel.app/explore-event-space2024-10-10T15:56:05.518Zdaily0.7 -https://nexmeet-lake.vercel.app/add-event2024-10-10T15:56:05.518Zdaily0.7 -https://nexmeet-lake.vercel.app/explore-events2024-10-10T15:56:05.518Zdaily0.7 -https://nexmeet-lake.vercel.app/dashboard2024-10-10T15:56:05.518Zdaily0.7 -https://nexmeet-lake.vercel.app/contact2024-10-10T15:56:05.518Zdaily0.7 -https://nexmeet-lake.vercel.app/unauthorized2024-10-10T15:56:05.518Zdaily0.7 -https://nexmeet-lake.vercel.app/update-event2024-10-10T15:56:05.518Zdaily0.7 -https://nexmeet-lake.vercel.app2024-10-10T15:56:05.518Zdaily0.7 -https://nexmeet-lake.vercel.app/about2024-10-10T15:56:05.518Zdaily0.7 -https://nexmeet-lake.vercel.app/manage-event2024-10-10T15:56:05.518Zdaily0.7 +https://www.nexmeet.social/add-community2024-11-10T08:59:39.236Zdaily0.7 +https://www.nexmeet.social/explore-community2024-11-10T08:59:39.237Zdaily0.7 +https://www.nexmeet.social/add-event2024-11-10T08:59:39.237Zdaily0.7 +https://www.nexmeet.social/explore-events2024-11-10T08:59:39.237Zdaily0.7 +https://www.nexmeet.social/manage-event2024-11-10T08:59:39.237Zdaily0.7 +https://www.nexmeet.social/update-event2024-11-10T08:59:39.237Zdaily0.7 +https://www.nexmeet.social/add-event-space2024-11-10T08:59:39.237Zdaily0.7 +https://www.nexmeet.social/explore-event-space/request-booking2024-11-10T08:59:39.237Zdaily0.7 +https://www.nexmeet.social/explore-event-space2024-11-10T08:59:39.237Zdaily0.7 +https://www.nexmeet.social/about2024-11-10T08:59:39.237Zdaily0.7 +https://www.nexmeet.social/admin2024-11-10T08:59:39.237Zdaily0.7 +https://www.nexmeet.social/community-patnership2024-11-10T08:59:39.237Zdaily0.7 +https://www.nexmeet.social/contact2024-11-10T08:59:39.237Zdaily0.7 +https://www.nexmeet.social/contributors2024-11-10T08:59:39.237Zdaily0.7 +https://www.nexmeet.social/dashboard2024-11-10T08:59:39.237Zdaily0.7 +https://www.nexmeet.social/event-calendar2024-11-10T08:59:39.237Zdaily0.7 +https://www.nexmeet.social/unauthorized2024-11-10T08:59:39.237Zdaily0.7 +https://www.nexmeet.social2024-11-10T08:59:39.237Zdaily0.7 \ No newline at end of file diff --git a/public/sitemap.xml b/public/sitemap.xml index dee5eda..2be3129 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -1,4 +1,4 @@ -https://nexmeet-lake.vercel.app/sitemap-0.xml +https://www.nexmeet.social/sitemap-0.xml \ No newline at end of file diff --git a/src/app/(community)/explore-community/page.tsx b/src/app/(community)/explore-community/page.tsx index dad497c..90459a1 100644 --- a/src/app/(community)/explore-community/page.tsx +++ b/src/app/(community)/explore-community/page.tsx @@ -8,8 +8,9 @@ import Loading from "../../../components/loading"; import { useUserDetails } from "../../../hooks/useUserDetails"; import Link from "next/link"; import { motion } from "framer-motion"; -import { SearchIcon, TrashIcon } from '@heroicons/react/solid'; // Import the search icon -import { LocationMarkerIcon } from '@heroicons/react/solid'; +import { SearchIcon, TrashIcon } from "@heroicons/react/solid"; // Import the search icon +import { LocationMarkerIcon } from "@heroicons/react/solid"; +import Image from "next/image"; const Page: React.FC = () => { // Define types @@ -23,7 +24,7 @@ const Page: React.FC = () => { community_image: string; community_creation_date: string; is_approved: boolean; -} + } // State hooks const [loading, setLoading] = useState(true); @@ -41,7 +42,9 @@ const Page: React.FC = () => { community_category: "", community_image: "", }); - const [editingCommunityId, setEditingCommunityId] = useState(null); // To track the community being edited + const [editingCommunityId, setEditingCommunityId] = useState( + null + ); // To track the community being edited const [joinFormData, setJoinFormData] = useState({ name: "", @@ -75,7 +78,13 @@ const Page: React.FC = () => { const handleFormSubmit = async (e: React.FormEvent) => { e.preventDefault(); - const { community_name, community_description, community_location, community_category, community_image } = newCommunity; + const { + community_name, + community_description, + community_location, + community_category, + community_image, + } = newCommunity; if (editingCommunityId) { // Update the community @@ -108,9 +117,8 @@ const Page: React.FC = () => { } } else { // Insert new community (as before) - const { data, error } = await supabase - .from("communities") - .insert([{ + const { data, error } = await supabase.from("communities").insert([ + { community_name, community_description, community_location, @@ -118,8 +126,9 @@ const Page: React.FC = () => { community_image, community_members_count: 0, community_creation_date: new Date().toISOString(), - is_approved: false - }]); + is_approved: false, + }, + ]); if (error) { toast.error("Failed to create community."); @@ -153,7 +162,9 @@ const Page: React.FC = () => { }; const handleDeleteCommunity = async (communityId: string) => { - const confirmation = window.confirm("Are you sure you want to delete this community?"); + const confirmation = window.confirm( + "Are you sure you want to delete this community?" + ); if (!confirmation) return; try { @@ -180,7 +191,9 @@ const Page: React.FC = () => { console.error("Error deleting community:", error); } else { toast.success("Community deleted successfully!"); - setCommunities((prev) => prev.filter((community) => community.id !== communityId)); + setCommunities((prev) => + prev.filter((community) => community.id !== communityId) + ); } } catch (error) { toast.error("An unexpected error occurred."); @@ -208,10 +221,16 @@ const Page: React.FC = () => { const filteredAndSortedCommunities = useMemo(() => { return communities .filter((community) => { - const matchesCategory = category ? community.community_category === category : true; + const matchesCategory = category + ? community.community_category === category + : true; const matchesSearchTerm = - community.community_name.toLowerCase().includes(searchTerm.toLowerCase()) || - community.community_location.toLowerCase().includes(searchTerm.toLowerCase()); + community.community_name + .toLowerCase() + .includes(searchTerm.toLowerCase()) || + community.community_location + .toLowerCase() + .includes(searchTerm.toLowerCase()); return matchesCategory && matchesSearchTerm; }) .sort((a, b) => { @@ -226,16 +245,23 @@ const Page: React.FC = () => { const indexOfLastItem = currentPage * itemsPerPage; const indexOfFirstItem = indexOfLastItem - itemsPerPage; - const currentCommunities = filteredAndSortedCommunities.slice(indexOfFirstItem, indexOfLastItem); + const currentCommunities = filteredAndSortedCommunities.slice( + indexOfFirstItem, + indexOfLastItem + ); - const totalPages = Math.ceil(filteredAndSortedCommunities.length / itemsPerPage); + const totalPages = Math.ceil( + filteredAndSortedCommunities.length / itemsPerPage + ); if (loading) { return ; } return ( - + Explore Communities @@ -307,12 +333,16 @@ const Page: React.FC = () => { > - - {community.community_name} + + {community.community_name} + {community.community_location} @@ -342,59 +372,111 @@ const Page: React.FC = () => { {showAddCommunityForm && ( - {editingCommunityId ? "Edit Community" : "Add New Community"} + + {editingCommunityId ? "Edit Community" : "Add New Community"} + - Community Name + + Community Name + setNewCommunity({ ...newCommunity, community_name: e.target.value })} + onChange={(e) => + setNewCommunity({ + ...newCommunity, + community_name: e.target.value, + }) + } required /> - Description + + Description + setNewCommunity({ ...newCommunity, community_description: e.target.value })} + onChange={(e) => + setNewCommunity({ + ...newCommunity, + community_description: e.target.value, + }) + } required /> - Location + + Location + setNewCommunity({ ...newCommunity, community_location: e.target.value })} + onChange={(e) => + setNewCommunity({ + ...newCommunity, + community_location: e.target.value, + }) + } required /> - Category + + Category + setNewCommunity({ ...newCommunity, community_category: e.target.value })} + onChange={(e) => + setNewCommunity({ + ...newCommunity, + community_category: e.target.value, + }) + } required /> - Community Image URL + + Community Image URL + setNewCommunity({ ...newCommunity, community_image: e.target.value })} + onChange={(e) => + setNewCommunity({ + ...newCommunity, + community_image: e.target.value, + }) + } required />
{community.community_location} @@ -342,59 +372,111 @@ const Page: React.FC = () => { {showAddCommunityForm && (