Skip to content

Commit

Permalink
fix: image not shown after auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham-Lal authored Jul 23, 2024
2 parents 97e8ffa + f93d76a commit 3746540
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions client/src/components/modal/auth/signup-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ const SignupTab: React.FC<RegisterDataProps> = ({ registerData, setRegisterData
typeof registerData.avatar === 'string' ? (
<img
src={registerData.avatar}
referrerPolicy='no-referrer'
alt='avatar'
style={{ width: '50px', height: '50px', objectFit: 'cover', border: '2px solid var(--body_color)', borderRadius: '50%' }}
/>
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/sidebar/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const Profile: React.FC<ProfileProps> = ({ isVisible }) => {
onClick={handleToggleMenu}
>
{user.avatar ? (
<img src={user.avatar} alt='' loading='lazy' />
<img src={user.avatar} alt='' loading='lazy' referrerPolicy='no-referrer' />
) : (
<FaRegUser style={{ width: '50%', height: '50%' }} />
)}
Expand All @@ -109,7 +109,7 @@ const Profile: React.FC<ProfileProps> = ({ isVisible }) => {
<div className='profile-wrapper'>
<Link to={user.username} className='modal-profile__image' onClick={handleToggleMenu}>
{user.avatar ? (
<img src={user.avatar} alt='' loading='lazy' />
<img src={user.avatar} alt='' loading='lazy' referrerPolicy='no-referrer' />
) : (
<FaRegUser style={{ width: '50%', height: '50%' }} />
)}
Expand Down
2 changes: 0 additions & 2 deletions client/src/pages/auth/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,4 @@ export default function AuthPage() {
navigate('/auth?type=signup', { replace: true });
}
}, [isAuthenticated, location.search, navigate, route, setAuthTab, setTempUser]);

return <div />
}
2 changes: 1 addition & 1 deletion client/src/pages/create-debate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const CreateDebatePage: React.FC<CreateProps> = ({ isVisible, isFullscreen }) =>

<Preview isPreview={isPreview} editorRef={editorRef} debateData={debateData} />

<div className={`debate-btns ${isVisible ? 'reveal' : 'hide'} ${isFullscreen ? 'w-full' : ''}`}>
<div className={`debate-btns ${isVisible ? 'reveal' : 'hide'} ${isFullscreen ? '' : 'w-full'}`}>
<button
type='button'
onClick={handlePreviewToggle}
Expand Down

0 comments on commit 3746540

Please sign in to comment.