Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

731 saved comapnies updates UI #735

Merged
merged 11 commits into from
Aug 30, 2024
Merged

Conversation

superolegatron
Copy link
Collaborator

@superolegatron superolegatron commented Aug 21, 2024

created visuall representation for saved companies updates, whenever saved company is updated, user will see a bell on its profile card
image
#731

Comment on lines 21 to 23
useEffect(() => {
setSavedIsUpdated(data.saved_is_updated);
}, [data.saved_is_updated]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: format it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it

></StarForLike>
<div className={css['bell-container']}>
<BellForUpdates
className={savedIsUpdated ? '' : 'hidden'}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need it? We do not use className prop in the BellForUpdates

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted redundant code

<div className={css['bell-container']}>
<BellForUpdates
className={savedIsUpdated ? '' : 'hidden'}
savedIsUpdated={savedIsUpdated}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering why we can't use data.saved_is_updated directly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it

@@ -107,7 +107,7 @@
}

.content__common-info {
width: 1169px;
width: 1150px;
Copy link
Collaborator

@popovycholeg popovycholeg Aug 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested it with screens different than 1150?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything seems to work ok with this task on various resolutions, but this whole issue with hardcoded sizes in pixels will be fixed in future


const { Paragraph } = Typography;

export default function ProfileCard({ isAuthorized, data }) {
const { user } = useAuth();
const [isSaved, setIsSaved] = useState(data.is_saved);
const [savedIsUpdated, setSavedIsUpdated] = useState(data.saved_is_updated);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering whether we can pass a callback to update it instead of cleaning it in the state.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check the new implementation, whether it is correct, or not

@superolegatron superolegatron merged commit 595d162 into develop Aug 30, 2024
4 checks passed
@superolegatron superolegatron deleted the 731-saved-comapnies-updates-ui branch August 30, 2024 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants