-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wallet Enhancements and Earnings Claiming Frontend Implementation (#536)
* Implement Portfolio and Transactions tab structure (#528) * feat: Create tabs for portfolio and transactions * feat: STUD-94 Add empty portfolio and transaction ui state (#534) * feat: STUD-94 Add empty portfolio and transaction ui state * feat: STUD-94 Add isSuccess and isError to custom thunk to mimic query functionality * feat: STUD-94 Fix logic to display/render song royalties to include only when there are songs * feat: STUD-96 Add UI for no pending earnings in wallet (#535) * feat: STUD-96 Add UI for no pending earnings in wallet * feat: STUD-96 Update logic to display/hide earning state * feat: Update copy for unclaimed royalties (#542) * feat: Update empty state copy for Wallet tab views (#556) * STUD-145: Update Portfolio table and time period filters for viewing accumulated royalties (#559) * feat: Update Portfolio Royalty Earnings formatting * feat: Add Royalty Earning desc table sorting * feat: Implement temp Royalty Song pagination * feat: Improve rendering of data with hooks * feat: Add filtering of single royalty earning date * feat: Improve test data structure to mimic query * feat: Modify Query data for consistent results * refactor: Update Dropdown event trigger name * fix: Pagination when data or rows change * STUD-145: Add Portfolio end of table copy (#573) * STUD-150: Implement no connected wallet ui (#576) * STUD-150: Modify copy for when no wallet is connected (#583) * fix: Update thunkHook from merge conflict issue * STUD-302-Integrate-feature-flag-into-wallet-enhancement-feature-branch (#706) * feat: Implement feature flag for wallet enhance * feat: Add current state of wallet for false flag --------- Co-authored-by: escobarjonatan <[email protected]>
- Loading branch information
1 parent
82f8693
commit c4475b3
Showing
25 changed files
with
1,103 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { FunctionComponent } from "react"; | ||
import { useNavigate } from "react-router-dom"; | ||
import { Stack, Typography } from "@mui/material"; | ||
import { Suitcase } from "@newm-web/assets"; | ||
import { Button } from "@newm-web/elements"; | ||
|
||
export const EmptyPortfolio: FunctionComponent = () => { | ||
const navigate = useNavigate(); | ||
|
||
return ( | ||
<Stack alignItems="center" mt={ 17.5 } rowGap={ 1.5 }> | ||
<Suitcase /> | ||
<Typography fontWeight={ 700 } mt={ 0.5 } variant="h4"> | ||
Your portfolio is empty | ||
</Typography> | ||
<Typography fontSize="14px" fontWeight={ 400 } variant="h4"> | ||
Only songs with stream tokens held in your connected wallet will be | ||
shown here | ||
</Typography> | ||
<Button | ||
color="music" | ||
sx={ { mt: 1.5 } } | ||
variant="secondary" | ||
width="compact" | ||
onClick={ () => navigate("/home/upload-song") } | ||
> | ||
Distribute & mint songs! | ||
</Button> | ||
</Stack> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { FunctionComponent } from "react"; | ||
import { Stack, Typography } from "@mui/material"; | ||
import { Document } from "@newm-web/assets"; | ||
|
||
export const EmptyTransactions: FunctionComponent = () => ( | ||
<Stack alignItems="center" mt={ 17.5 } rowGap={ 1.5 }> | ||
<Document /> | ||
<Typography fontWeight={ 700 } mt={ 0.5 } variant="h4"> | ||
No transactions found | ||
</Typography> | ||
<Typography fontSize="14px" fontWeight={ 400 } variant="h4"> | ||
All future transactions made with the connected wallet will be listed here | ||
</Typography> | ||
</Stack> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { Stack, Typography } from "@mui/material"; | ||
import { Button } from "@newm-web/elements"; | ||
import { NEWMLogo } from "@newm-web/assets"; | ||
import { setIsConnectWalletModalOpen } from "../../../modules/ui"; | ||
import { useAppDispatch } from "../../../common"; | ||
|
||
export const NoConnectedWallet = () => { | ||
const dispatch = useAppDispatch(); | ||
|
||
return ( | ||
<Stack | ||
alignItems="center" | ||
height="100%" | ||
justifyContent="center" | ||
margin="0 auto" | ||
maxWidth="500px" | ||
rowGap={ 1 } | ||
textAlign="center" | ||
> | ||
<NEWMLogo /> | ||
<Typography component="h1" fontWeight="700" mt={ 4 } variant="body2"> | ||
Connect your wallet | ||
</Typography> | ||
<Typography variant="subtitle1"> | ||
Connecting your wallet will enable you to claim your accrued royalties, | ||
stream token sale earnings, and view your transaction history. | ||
</Typography> | ||
<Button | ||
gradient="crypto" | ||
sx={ { mt: 2 } } | ||
width="compact" | ||
onClick={ () => dispatch(setIsConnectWalletModalOpen(true)) } | ||
> | ||
Connect Wallet | ||
</Button> | ||
</Stack> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { FunctionComponent } from "react"; | ||
import { Stack, Typography } from "@mui/material"; | ||
import { CheckCircle } from "@newm-web/assets"; | ||
import theme from "@newm-web/theme"; | ||
|
||
export const NoPendingEarnings: FunctionComponent = () => ( | ||
<Stack | ||
sx={ { | ||
backgroundColor: theme.colors.grey600, | ||
borderRadius: "6px", | ||
flexDirection: "row", | ||
gap: 1.5, | ||
p: 2, | ||
width: "fit-content", | ||
} } | ||
> | ||
<CheckCircle fill={ theme.colors.green } /> | ||
<Stack> | ||
<Typography color={ theme.colors.green } fontWeight={ 500 }> | ||
No pending earnings to claim | ||
</Typography> | ||
<Typography color={ theme.colors.grey200 } fontWeight={ 500 }> | ||
Total earnings accrued so far: ##.##Ɲ (~$#.##) | ||
</Typography> | ||
</Stack> | ||
</Stack> | ||
); |
Oops, something went wrong.