Skip to content

Commit 33bb933

Browse files
committed
Background image fix -back in history
1 parent a65f320 commit 33bb933

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/components/Dao/DaoSchemesPage.scss

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,14 @@
4242
}
4343

4444
.daoHeaderBackground {
45-
// @TODO Image is repeating, check this later when using real image
46-
// background-image: url(/assets/images/bg-test.jpeg);
47-
width: 115%;
48-
position: absolute;
4945
display: flex;
5046
height: 30%;
5147
top:0;
5248
right: 0;
5349
z-index: 9999999;
50+
position: fixed;
51+
height: 30%;
52+
width: 100vw;
5453
}
5554

5655
@media only screen and (max-width: 425px) {

src/components/Dao/DaoSchemesPage.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@ const Fade = ({ children, ...props }: any) => (
3333
</CSSTransition>
3434
);
3535

36-
const DAOHeaderBackground = (props: any) => (
37-
<div
36+
const DAOHeaderBackground = (props: { backgroundImage: string }) => (
37+
<img
3838
className={css.daoHeaderBackground}
39-
style={{ backgroundImage: `url(${props.backgroundImage})`, backgroundRepeat: "no-repeat" }}
40-
></div>
39+
src={props.backgroundImage}
40+
alt="daoHeaderBackground"
41+
/>
4142
);
4243

4344
type IExternalProps = {
@@ -100,7 +101,7 @@ class DaoSchemesPage extends React.Component<IProps, null> {
100101

101102
return (
102103
<div className={css.wrapper}>
103-
{ backgroundImage && <DAOHeaderBackground backgroundImage={backgroundImage} /> }
104+
{ (signal && backgroundImage) && <DAOHeaderBackground backgroundImage={backgroundImage} /> }
104105
<BreadcrumbsItem to={"/dao/" + dao.address}>{dao.name}</BreadcrumbsItem>
105106
{ signal && <DAOHeader {...this.props} signal={signal} /> }
106107
<Sticky enabled top={50} innerZ={10000}>

0 commit comments

Comments
 (0)