import React, { useContext, useEffect } from 'react'; import { Link, useLocation } from 'react-router-dom'; import { HeaderContext } from '../context'; export default function ParentSide() { const father_image = document.getElementById('father_image').value; const { selected_item_sidebar, SetSelectedItemOfSidebar, handleLogout } = useContext(HeaderContext); const {pathname} = useLocation(); useEffect(()=>{ SetSelectedItemOfSidebar(pathname.split('/')[2]); }, []) return (
ロゴ
); }