updated profile layout
This commit was merged in pull request #66.
This commit is contained in:
@@ -1,16 +1,31 @@
|
||||
import React from 'react'
|
||||
import { Outlet, useLocation } from 'react-router-dom';
|
||||
import UserMenu from "./layoutcom/UserMenu";
|
||||
import UserHeader from "./layoutcom/UserHeader";
|
||||
import UserFooter from "./layoutcom/UserFooter";
|
||||
import { Outlet } from 'react-router-dom';
|
||||
import siteLinks from '../../links/siteLinks';
|
||||
|
||||
|
||||
export default function Layout() {
|
||||
|
||||
const {pathname} = useLocation()
|
||||
const isProfileComplete = pathname == siteLinks.profile_complete
|
||||
|
||||
return (
|
||||
<div className="app">
|
||||
{isProfileComplete ?
|
||||
<div className="app-wrap">
|
||||
<UserHeader />
|
||||
<div className="container-fluid">
|
||||
<Outlet />
|
||||
</div>
|
||||
<UserFooter isProfileComplete={isProfileComplete} />
|
||||
</div>
|
||||
:
|
||||
<div className="app-wrap">
|
||||
<UserHeader />
|
||||
<div className="app-container">
|
||||
|
||||
<aside className="app-navbar">
|
||||
<UserMenu />
|
||||
</aside>
|
||||
@@ -22,6 +37,7 @@ export default function Layout() {
|
||||
</div>
|
||||
<UserFooter />
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import React from "react";
|
||||
|
||||
export default function UserFooter(){
|
||||
export default function UserFooter({isProfileComplete=false}){
|
||||
|
||||
const year = new Date().getFullYear()
|
||||
|
||||
return <>
|
||||
<footer className="footer">
|
||||
<footer className={`${isProfileComplete && 'w-100'} footer`}>
|
||||
<div className="row">
|
||||
<div className="col-12 col-sm-6 text-center text-sm-left">
|
||||
<p>© Copyright {year}. All rights reserved.</p>
|
||||
|
||||
@@ -73,7 +73,7 @@ export default function UserHeader(){
|
||||
|
||||
<ul className="navbar-nav nav-right ml-auto">
|
||||
<li className="nav-item user-profile">
|
||||
<a onClick={toggleMenu} href="#" className="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdow">
|
||||
<a onClick={toggleMenu} className="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdow">
|
||||
<img src={getImage('profile-pic-circle.png')} alt="avtar-img" />
|
||||
<span className="bg-success user-status"></span>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user