mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 23:15:36 +00:00
refactor: controllers and models to adapt them to the previous version of my-links
This commit is contained in:
@@ -4,7 +4,7 @@ import useUser from '~/hooks/use_user';
|
||||
|
||||
export default function UserCard() {
|
||||
const { user, isAuthenticated } = useUser();
|
||||
const altImage = `${user?.nickName}'s avatar`;
|
||||
const altImage = `${user?.fullname}'s avatar`;
|
||||
return (
|
||||
isAuthenticated && (
|
||||
<Item className="disable-hover">
|
||||
@@ -14,7 +14,7 @@ export default function UserCard() {
|
||||
alt={altImage}
|
||||
referrerPolicy="no-referrer"
|
||||
/>
|
||||
{user.nickName}
|
||||
{user.fullname}
|
||||
</Item>
|
||||
)
|
||||
);
|
||||
|
||||
@@ -103,7 +103,7 @@ function ProfileDropdown() {
|
||||
width={22}
|
||||
referrerPolicy="no-referrer"
|
||||
/>
|
||||
{user!.nickName}
|
||||
{user!.fullname}
|
||||
</UserCard>
|
||||
}
|
||||
>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Link } from '@inertiajs/react';
|
||||
import { route } from '@izzyjs/route/client';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { BsGear } from 'react-icons/bs';
|
||||
import { PiGearLight } from 'react-icons/pi';
|
||||
import Modal from '~/components/common/modal/modal';
|
||||
import LangSelector from '~/components/lang_selector';
|
||||
import ThemeSwitcher from '~/components/theme_switcher';
|
||||
@@ -20,7 +20,7 @@ export default function ModalSettings({
|
||||
return (
|
||||
<>
|
||||
<OpenItem onClick={open}>
|
||||
<BsGear />
|
||||
<PiGearLight />
|
||||
{t('settings')}
|
||||
</OpenItem>
|
||||
<Modal title={t('settings')} opened={isShowing} close={close}>
|
||||
|
||||
Reference in New Issue
Block a user