Skip to content

Commit

Permalink
Merge pull request #626 from idurar/dev
Browse files Browse the repository at this point in the history
Minor Update
  • Loading branch information
salahlalami authored Oct 31, 2023
2 parents fe444df + 133bafb commit 133aeab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ But if you'd like to check it out more news and website you can always check it
## License

IDURAR is [fair-code](http://faircode.io) distributed under the
[**Developer Trial Use Licensee**](https://github.com/idurar/idurar-erp-crm/blob/master/LICENSE.md) and the
[**IDURAR Enterprise License**](https://github.com/idurar/idurar-erp-crm/blob/master/LICENSE_EE.md).
[**Developer Trial Use Licensee**](https://github.com/idurar/idurar-erp-crm/blob/master/LICENSE) and the
[**IDURAR Enterprise License**](https://github.com/idurar/idurar-erp-crm/blob/master/LICENSE_EE).

Proprietary licenses are available for enterprise customers. [Get in touch](mailto:[email protected])

Expand Down
18 changes: 8 additions & 10 deletions frontend/src/apps/components/HeaderContent.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { useDispatch, useSelector } from 'react-redux';
import { useSelector } from 'react-redux';
import { Link } from 'react-router-dom';
import { Avatar, Dropdown, Layout } from 'antd';

// import Notifications from '@/components/Notification';

import { AppstoreOutlined, SettingOutlined, LogoutOutlined } from '@ant-design/icons';
import { SettingOutlined, LogoutOutlined } from '@ant-design/icons';

import { checkImage } from '@/request';

import { selectCurrentAdmin } from '@/redux/auth/selectors';
import { translateAction } from '@/redux/translate/actions';

import { useNavigate } from 'react-router-dom';

import { BASE_URL } from '@/config/serverApiConfig';
Expand All @@ -21,13 +21,11 @@ export default function HeaderContent() {
const currentAdmin = useSelector(selectCurrentAdmin);
const { Header } = Layout;

const dispatch = useDispatch();

const translate = useLanguage();

const srcImgProfile = checkImage(BASE_URL + currentAdmin?.photo)
? BASE_URL + currentAdmin?.photo
: null;
const hasPhotoprofile = checkImage(BASE_URL + currentAdmin?.photo);

const srcImgProfile = hasPhotoprofile ? BASE_URL + currentAdmin?.photo : null;

const ProfileDropdown = () => {
const navigate = useNavigate();
Expand All @@ -37,7 +35,7 @@ export default function HeaderContent() {
size="large"
className="last"
src={srcImgProfile}
style={{ color: '#f56a00', backgroundColor: !srcImgProfile ? '#fde3cf' : 'none' }}
style={{ color: '#f56a00', backgroundColor: !hasPhotoprofile ? '#fde3cf' : '#f9fafc' }}
>
{currentAdmin?.name.charAt(0).toUpperCase()}
</Avatar>
Expand Down Expand Up @@ -113,7 +111,7 @@ export default function HeaderContent() {
src={srcImgProfile}
style={{
color: '#f56a00',
backgroundColor: !srcImgProfile ? '#fde3cf' : 'none',
backgroundColor: !hasPhotoprofile ? '#fde3cf' : '#f9fafc',
float: 'right',
}}
size="large"
Expand Down

0 comments on commit 133aeab

Please sign in to comment.