Skip to content

Commit

Permalink
Merge branch 'feat-mvp' of github.com:Mississippi-Labs/mississippi in…
Browse files Browse the repository at this point in the history
…to feat-mvp
  • Loading branch information
TiyoSheng committed Oct 21, 2023
2 parents d995126 + e1cc900 commit bcc5c49
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 3 deletions.
Binary file added packages/client/src/assets/img/loot1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/client/src/assets/img/loot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 10 additions & 2 deletions packages/client/src/components/UserInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,19 @@ interface IProps {
head: string;
clothes: string;
handheld: string;
minting: boolean;
}

const UserInfo = (props: IProps) => {

const { handheld, head, clothes } = props;
const { handheld, head, clothes, minting } = props;


// useEffect(() => {
// setTimeout(() => {
// setLoading(false)
// }, 2000)
// }, [])

return (
<div className={'mi-userinfo-wrapper'}>
Expand All @@ -24,7 +32,7 @@ const UserInfo = (props: IProps) => {
<Appearance clothes={clothes} handheld={handheld} head={head}/>
</div>
</div>
<div className="loot-wrapper">
<div className={`loot-wrapper ${minting ? '' : 'loaded'}`}>
<div className="loot-detail">

</div>
Expand Down
10 changes: 10 additions & 0 deletions packages/client/src/components/UserInfo/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@
justify-content: space-between;
flex-direction: column;
height: 100%;

&.loaded {
.loot-detail:nth-child(1) {
background: url("../../assets/img/loot1.png") no-repeat center / 100%;
}

.loot-detail:nth-child(2) {
background: url("../../assets/img/loot2.png") no-repeat center / 100%;
}
}
}

.loot-detail {
Expand Down
6 changes: 5 additions & 1 deletion packages/client/src/pages/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const Home = () => {
title: '',
});

const [minting, setMinting] = useState(true);

const navigate = useNavigate();

useEffect(() => {
Expand Down Expand Up @@ -82,6 +84,8 @@ const Home = () => {
setHandheld(handheld);
setHead(head);

setMinting(false);

setTimeout(() => {
navigate('/game', {
state: {
Expand Down Expand Up @@ -132,7 +136,7 @@ const Home = () => {
<div className="mi-section mint-section">
<div className="mint-box">
<h2 className="mint-title">HOME</h2>
<UserInfo clothes={clothes} handheld={handheld} head={head}/>
<UserInfo clothes={clothes} handheld={handheld} head={head} minting={minting}/>
<button className="mi-btn" onClick={mintAndGo}>MINT AND GO</button>
</div>
</div>
Expand Down

0 comments on commit bcc5c49

Please sign in to comment.