Skip to content

Commit

Permalink
fix(adviser): fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
happylolonly committed Aug 2, 2023
1 parent 99042f7 commit 96b8974
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 27 deletions.
12 changes: 6 additions & 6 deletions src/features/adviser/Adviser/Adviser.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $animation-time: 2.3s;
align-items: center;
flex-direction: column;
justify-content: center;
width: 500px;
min-width: 400px;
font-size: 16px;
color: white;
overflow: hidden;
Expand Down Expand Up @@ -39,7 +39,7 @@ $animation-time: 2.3s;
cursor: unset;

&::before {
filter: blur(11px);
filter: blur(15px);
}

--color-r: 255;
Expand Down Expand Up @@ -79,8 +79,9 @@ $animation-time: 2.3s;

&.open,
&:disabled {
&::before {
animation: none;
&::before,
.summary {
animation-name: none;
}
}

Expand Down Expand Up @@ -121,7 +122,7 @@ $animation-time: 2.3s;
transition: all 1s;
opacity: 1;

animation: pulse 2.3s infinite alternate;
animation: pulse $animation-time infinite alternate;

width: $size;
height: $size;
Expand Down Expand Up @@ -151,7 +152,6 @@ $animation-time: 2.3s;
}

.content {
// width: 670px;
text-align: center;
text-shadow: 0px 0px 5px
rgba(var(--color-r), var(--color-b), var(--color-g), 0.7);
Expand Down
23 changes: 11 additions & 12 deletions src/features/adviser/AdviserContainer.module.scss
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
.wrapper {
// position: relative;
position: sticky;

top: 75px;
margin: auto;
display: block;

z-index: 3;
max-width: 50%;
// top: 25px;

margin-top: -45px;
margin-bottom: 10px;
// margin-top: 60px;

display: flex;
justify-content: center;
}

.blurWrapper {
position: relative;
padding: 0 10px;

&::before {
content: '';
position: absolute;
background-color: black;
// border: 1px solid red;
z-index: -1;
width: 100%;
height: 110%;
left: 0;

filter: blur(10px);
filter: blur(12px);
}
}
.adviser {
margin: auto;
}
20 changes: 11 additions & 9 deletions src/features/adviser/AdviserContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ function AdviserContainer() {

return (
<div className={styles.wrapper}>
<Adviser
disabled={!content}
className={styles.adviser}
isOpen={isOpen && !!content}
color={color}
openCallback={setIsOpen}
>
{content}
</Adviser>
<div className={styles.blurWrapper}>
<Adviser
disabled={!content}
className={styles.adviser}
isOpen={isOpen && !!content}
color={color}
openCallback={setIsOpen}
>
{content}
</Adviser>
</div>
</div>
);
}
Expand Down
4 changes: 4 additions & 0 deletions src/pages/robot/ZeroUser/ZeroUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ function ZeroUser() {
features of cyb.
</>
);

return () => {
setAdviser(null);
};
}, [setAdviser]);

return (
Expand Down

0 comments on commit 96b8974

Please sign in to comment.