diff --git a/README.md b/README.md index 718c305..9bfbe3e 100644 --- a/README.md +++ b/README.md @@ -110,9 +110,6 @@ Our API is designed to give you access to all core functionalities of DevHub pro -For the full API documentation, visit the following link: -[Postman API Documentation](https://documenter.getpostman.com/view/37803453/2sAXxP9Cxo) - ## Conclusion 🎉 By integrating LLMs for natural language understanding, LangChain for workflow enhancement, and Neo4j for advanced data storage and querying, DevHub offers a comprehensive solution for devs seeking meaningful collaborations. This combination not only enhances user experience but also ensures that connections are based on relevant skills and interests, leading to more effective teamwork. diff --git a/client/src/App.tsx b/client/src/App.tsx index c0197fd..b64a2e9 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -17,7 +17,6 @@ import UserPosts from './pages/UserPosts'; import ShowPostByID from './components/Posts/ShowPostByID'; const App = () => { - return ( diff --git a/client/src/components/Navbar/Navbar.tsx b/client/src/components/Navbar/Navbar.tsx index 6ac5391..bdd7813 100644 --- a/client/src/components/Navbar/Navbar.tsx +++ b/client/src/components/Navbar/Navbar.tsx @@ -6,13 +6,13 @@ export type IconProps = React.HTMLAttributes & React.ImgHTMLAttribut export function Navbar() { const gotoGithub = () => { - window.location.href = "https://github.com" + window.location.href = "https://github.com/devhub-ai/devhub" } const gotoDiscord = () => { window.location.href = "https://discord.gg/u86Gy2qFHm" } const gotoFeed = () => { - window.location.href = "https://devhub.page/feed" + window.location.href = "https://devhub.page/feed" } return (
@@ -52,9 +52,7 @@ const Icons = { /> ), Feed: (props: IconProps) => ( - - - + ), Discord:(props: IconProps) => ( diff --git a/client/src/components/Projects/AddProject.tsx b/client/src/components/Projects/AddProject.tsx index e8b3bf0..634bd6c 100644 --- a/client/src/components/Projects/AddProject.tsx +++ b/client/src/components/Projects/AddProject.tsx @@ -104,7 +104,7 @@ const AddProject: React.FC<{ onProjectChange: () => void }> = ({ onProjectChange toast.success('Project added successfully'); setNewProject({ title: '', description: '', repoLink: '', tags: [], imageUrl: '' }); // Reset form setImageFile(null); // Reset the image file - onProjectChange(); + onProjectChange(); // Trigger refresh } else { toast.error('Failed to add project'); } diff --git a/client/src/components/Settings/BannerUpdate.tsx b/client/src/components/Settings/BannerUpdate.tsx new file mode 100644 index 0000000..fbc5715 --- /dev/null +++ b/client/src/components/Settings/BannerUpdate.tsx @@ -0,0 +1,9 @@ + + +const BannerUpdate = () => { + return ( +
BannerUpdate
+ ) +} + +export default BannerUpdate \ No newline at end of file diff --git a/client/src/components/Settings/DeleteAccount.tsx b/client/src/components/Settings/DeleteAccount.tsx new file mode 100644 index 0000000..c175b06 --- /dev/null +++ b/client/src/components/Settings/DeleteAccount.tsx @@ -0,0 +1,53 @@ +import axios from 'axios'; +import { useNavigate } from 'react-router-dom'; +import { Button } from "@/components/ui/button"; +import { useState } from 'react'; +import { toast } from 'sonner'; +import { Icons } from "@/components/ui/icons"; + +const username = localStorage.getItem('devhub_username'); +const backendUrl = import.meta.env.VITE_BACKEND_URL || 'http://localhost:5000'; + +const DeleteAccount = () => { + const navigate = useNavigate(); + const [isLoading, setIsLoading] = useState(false); + + const handleDelete = async () => { + setIsLoading(true); + try { + const response = await axios.delete(`${backendUrl}/profile/delete/${username}`); + if (response.status === 200) { + toast.success('Account deleted successfully.'); + localStorage.removeItem('devhub_username'); + navigate('/'); + } else { + toast.error('Failed to delete account.'); + } + } catch (error) { + console.error('Error:', error); + toast.error('An error occurred while deleting the account.'); + } finally { + setIsLoading(false); + } + }; + + return ( +
+

Once you delete an account, there is no going back. Please be certain.

+ +
+ ); +}; + +export default DeleteAccount; diff --git a/client/src/components/Settings/UpdateProfile.tsx b/client/src/components/Settings/UpdateProfile.tsx index 4c0ad6b..d5830b3 100644 --- a/client/src/components/Settings/UpdateProfile.tsx +++ b/client/src/components/Settings/UpdateProfile.tsx @@ -7,6 +7,7 @@ import { toast } from 'sonner'; import { Textarea } from '../ui/textarea'; import { Icons } from "@/components/ui/icons"; import UploadComponent from '@/components/UploadComponent/UploadComponent'; +import { ScrollArea } from "@/components/ui/scroll-area" const backendUrl = import.meta.env.VITE_BACKEND_URL || 'http://localhost:5000'; @@ -100,89 +101,91 @@ const UpdateProfile = () => { }; return ( -
-

+
+

Update Profile

-
- - -
-
- - -
-
- -