+
{
(data.user) &&
}
diff --git a/src/components/ProfileMenuBox.jsx b/src/components/ProfileMenuBox.jsx
index a01500c..fd2c4c8 100644
--- a/src/components/ProfileMenuBox.jsx
+++ b/src/components/ProfileMenuBox.jsx
@@ -1,8 +1,25 @@
-import React from 'react'
+import React, { useContext } from 'react'
import { Link } from 'react-router-dom'
+import { GSContext } from '../middlewares/GlobalState';
export default function ProfileMenuBox(props) {
+ const { profile } = useContext(GSContext);
+
+ console.log(profile)
+
return (
-
{props.setSelectedMenu(0)}} className={'flex items-center justify-center h-full w-full hover:bg-pc hover:bg-opacity-50 ' + (props.selectedMenu === 0 && 'bg-pc font-bold')}>{props.profile.first_name} {props.profile.second_name}
+
+
+
+
+
{profile.first_name} {profile.second_name}
+
@{profile.username}
+
+
+ {/*
{profile.followers} Takipçi
*/}
+ {/*
30 Takip
*/}
+
+
+
);
};
\ No newline at end of file
diff --git a/src/components/blogs/Right.jsx b/src/components/blogs/Right.jsx
new file mode 100644
index 0000000..ea0b082
--- /dev/null
+++ b/src/components/blogs/Right.jsx
@@ -0,0 +1,27 @@
+import React, { useEffect, useState } from 'react'
+import Categories from '../Categories'
+import { FetchPOST } from '../../middlewares/Fetch';
+import { Link } from 'react-router-dom';
+
+export default function Right(props) {
+ const [selectedMenu, setSelectedMenu] = useState(0);
+ const [cates, setCates] = useState();
+
+ useEffect(()=>{
+ if(!cates){
+ FetchPOST({
+ port: 3001,
+ pathname: "/get/blogs/cate/all"
+ })
+ .then(res => setCates(res));
+ }
+ console.log(cates)
+ },[])
+
+ return (
+ <>
+
Gönderi Oluştur
+
+ >
+ );
+};
\ No newline at end of file
diff --git a/src/components/blogs/posts/SavedButton.jsx b/src/components/blogs/posts/SavedButton.jsx
index e6ff32b..88fb063 100644
--- a/src/components/blogs/posts/SavedButton.jsx
+++ b/src/components/blogs/posts/SavedButton.jsx
@@ -4,7 +4,7 @@ import { FetchPOST } from '../../../middlewares/Fetch';
export default function SavedButton({blogId, saved}) {
const [isSaved, setIsSaved] = useState((saved.length > 0) && saved[0].statu);
return (
- {setIsSaved(await saveBlog(blogId))}}>
+
{setIsSaved(await saveBlog(blogId))}}>
{(isSaved) ? 'Kaydettin' : 'Kaydet'}
)
diff --git a/src/components/homepage/Left.jsx b/src/components/homepage/Left.jsx
new file mode 100644
index 0000000..27a85b4
--- /dev/null
+++ b/src/components/homepage/Left.jsx
@@ -0,0 +1,46 @@
+import React from 'react'
+import ProfileMenuBox from '../ProfileMenuBox'
+import { Link } from 'react-router-dom'
+
+export default function Left({profile, selectedMenu, setSelectedMenu}) {
+ return (
+ <>
+
+
+
+
+
+
+
+
+
+
Anasayfa
+
+
Gönderiler
+
Keşfet
+
+
+
+
+ Mesajlar
+ Bildirimler
+
+
+
+
+ >
+ )
+}
diff --git a/src/components/popups/Photo.jsx b/src/components/popups/Photo.jsx
new file mode 100644
index 0000000..47c701e
--- /dev/null
+++ b/src/components/popups/Photo.jsx
@@ -0,0 +1,15 @@
+import React from 'react'
+import { closePopup } from '../../middlewares/PopupActions'
+
+export default function Photo({src}) {
+ return (
+
+
+
+
+
+
+ );
+};
\ No newline at end of file
diff --git a/src/components/profiles/Follow/components/User.jsx b/src/components/profiles/Follow/components/User.jsx
index d4989b6..739015a 100644
--- a/src/components/profiles/Follow/components/User.jsx
+++ b/src/components/profiles/Follow/components/User.jsx
@@ -26,8 +26,8 @@ export default function User({data, button, buttonAction, uid="default"}) {
@{data.username}
);
diff --git a/src/components/profiles/Left.jsx b/src/components/profiles/Left.jsx
new file mode 100644
index 0000000..bac6f3d
--- /dev/null
+++ b/src/components/profiles/Left.jsx
@@ -0,0 +1,94 @@
+import React from 'react'
+import { Link } from 'react-router-dom'
+import { FetchPOST } from '../../middlewares/Fetch';
+
+export default function Left({profile}) {
+ const friendPOST = (e) => {
+ FetchPOST({
+ port: 3001,
+ pathname: "/post/follow",
+ fetchData:{
+ method: "POST",
+ credentials: 'include',
+ headers: {
+ 'Accept' : 'application/json',
+ 'Content-Type' : 'application/json'
+ },
+ body: JSON.stringify({
+ userId: profile.user.id
+ })
+ }
+ }).then(res => {
+ if(res.follow){
+ e.target.innerText = res.follow.title;
+ console.log(res)
+ if(res.follow.statu === true){
+ console.log(5)
+ e.target.classList.add("bg-pc", "bg-opacity-40")
+ }
+ };
+ });
+ };
+
+ return (
+ <>
+
+
+
+
+
+
+
+
{profile.user.first_name} {profile.user.second_name}
+
@{profile.user.username}
+
+
+ {profile.user.followers.length} Takipçi
+ {profile.user.followings.length} Takip
+
+
+
+
+ {
+ (profile.isMy === false) &&
+
+
{(profile.user.follows.length > 0) ? profile.user.follows[0].button.text : profile.user.button.text}
+
+ }
+
+
+
+
+
+
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid, ullam accusantium provident iure consequuntur reprehenderit laborum aut aspernatur laboriosam repellat iusto nisi veniam sapiente vitae aperiam nobis dolorum ipsa temporibus.
+
+
+
+
+ >
+ );
+};
+
diff --git a/src/components/profiles/Right.jsx b/src/components/profiles/Right.jsx
new file mode 100644
index 0000000..0db5783
--- /dev/null
+++ b/src/components/profiles/Right.jsx
@@ -0,0 +1,23 @@
+import React, { useEffect } from 'react'
+import { Link } from 'react-router-dom'
+
+export default function Right({pathname, plugin}) {
+ console.log(plugin)
+ return (
+
+ {plugin}
+
+
+
+
+ Özetleme
+
+
+ Gönderiler
+
+
+
+
+
+ )
+}
diff --git a/src/components/profiles/components/Header.jsx b/src/components/profiles/components/Header.jsx
index cac2a03..d3f4a4b 100644
--- a/src/components/profiles/components/Header.jsx
+++ b/src/components/profiles/components/Header.jsx
@@ -60,7 +60,7 @@ export default function Header({data}) {
{
(data.isMy === false) &&
}
diff --git a/src/components/profiles/posts/RightPlugin.jsx b/src/components/profiles/posts/RightPlugin.jsx
new file mode 100644
index 0000000..e4f6137
--- /dev/null
+++ b/src/components/profiles/posts/RightPlugin.jsx
@@ -0,0 +1,11 @@
+import React, { useContext, useEffect } from 'react'
+import { GSContext } from '../../../middlewares/GlobalState';
+
+export default function RightPlugin({cates, selectedMenu, setSelectedMenus, pathname}) {
+ // const { exports } = useContext(GSContext);
+
+ return (
+