Skip to content

Commit

Permalink
fix: progress bar not sticky issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Meriem-BM committed Oct 28, 2024
1 parent 6960af3 commit 5e19777
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 19 deletions.
36 changes: 21 additions & 15 deletions app/allocation/components/EOA/ConnectEOAModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,30 @@ const ConnectEOAModal: FC<TConnectEOAModalProps> = ({ email, setStep }) => {
return;
}

const msg = 'Sign in with Thirdweb wallet';
const account = wallet?.getAccount();
try {
const msg = 'Sign in with Thirdweb wallet';
const account = wallet?.getAccount();

if (!account) {
setError('Unable to connect to your wallet');
setLoading(false);
return;
}
if (!account) {
setError('Unable to connect to your wallet');
setLoading(false);
return;
}

const signature = await account.signMessage({ message: msg });
const signature = await account.signMessage({ message: msg });

await axiosInstance.post('auth/thirdweb/login', {
message: msg,
signature,
address: account.address,
});
setLoading(false);
setStep(Step.SUCCESS);
await axiosInstance.post('auth/thirdweb/login', {
message: msg,
signature,
address: account.address,
});
setLoading(false);
setStep(Step.SUCCESS);
}
catch (err) {
setError('An error occurred while connecting to your wallet');
setLoading(false);
}
};

return (
Expand Down
8 changes: 4 additions & 4 deletions app/comparison/card/Header-RF6.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ const HeaderRF6: FC<HeaderProps> = ({
}, [badges]);

useEffect(() => {
const HEADER_HEIGHT = 80;

const handleScroll = () => {
if (window.scrollY > 100) {
if (window.scrollY > HEADER_HEIGHT) {
setIsBarFixed(true);
}
else {
Expand Down Expand Up @@ -151,9 +153,7 @@ const HeaderRF6: FC<HeaderProps> = ({
{category}
</span>
)}
<div
className="hidden items-center gap-4 2xl:flex"
>
<div className="hidden items-center gap-4 2xl:flex">
{activeBadges.length > 0 && (
<button
onClick={() => setIsBadgesModalOpen(true)}
Expand Down

0 comments on commit 5e19777

Please sign in to comment.