Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 134
[PAY-3324] Add copy notice around network take rate#9608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -56,3 +56,7 @@ | ||
| box-shadow: 'none'; | ||
| background-color: 'red'; | ||
| } | ||
| .tableHeaderSmallPadding { | ||
| padding-top: var(--harmony-spacing-s); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -2,21 +2,25 @@ import { useCallback, useState } from 'react' | ||
| import { useGetSales, useGetSalesCount, Id } from '@audius/common/api' | ||
| import { useAllPaginatedQuery } from '@audius/common/audius-query' | ||
| import { useFeatureFlag } from '@audius/common/hooks' | ||
| import { | ||
| Status, | ||
| statusIsNotFinalized, | ||
| combineStatuses, | ||
| USDCPurchaseDetails | ||
| } from '@audius/common/models' | ||
| import { FeatureFlags } from '@audius/common/services' | ||
| import { | ||
| accountSelectors, | ||
| useUSDCPurchaseDetailsModal | ||
| } from '@audius/common/store' | ||
| import { route } from '@audius/common/utils' | ||
| import { Flex, IconMoneyBracket, Text, useTheme } from '@audius/harmony' | ||
| import { full } from '@audius/sdk' | ||
| import { push as pushRoute } from 'connected-react-router' | ||
| import { useDispatch } from 'react-redux' | ||
| import { ExternalTextLink } from 'components/link' | ||
| import { useErrorPageOnFailedStatus } from 'hooks/useErrorPageOnFailedStatus' | ||
| import { useIsMobile } from 'hooks/useIsMobile' | ||
| import { useMainContentRef } from 'pages/MainContentContext' | ||
| @@ -44,7 +48,10 @@ const messages = { | ||
| noSalesBody: 'Once you make a sale, it will show up here.', | ||
| upload: 'Upload Track', | ||
| headerText: 'Your Sales', | ||
| downloadCSV: 'Download CSV' | ||
| downloadCSV: 'Download CSV', | ||
| networkSplitExplainer: | ||
| 'You will instantly receive 90% of the retail price for every transaction.', | ||
| learnMore: 'Learn more.' | ||
| } | ||
| const TRANSACTIONS_BATCH_SIZE = 50 | ||
| @@ -176,13 +183,30 @@ export const SalesTab = ({ | ||
| }: Omit<ReturnType<typeof useSales>, 'downloadCSV'>) => { | ||
| const isMobile = useIsMobile() | ||
| const mainContentRef = useMainContentRef() | ||
| const { color } = useTheme() | ||
| const { isEnabled: isNetworkCutEnabled } = useFeatureFlag( | ||
| FeatureFlags.NETWORK_CUT_ENABLED | ||
| ) | ||
| const columns = isMobile | ||
| ? (['contentName', 'date', 'value'] as SalesTableColumn[]) | ||
| : undefined | ||
| return ( | ||
| <div className={styles.container}> | ||
| {isNetworkCutEnabled ? ( | ||
| <Flex gap='s' ph='l' pt='xl' alignItems='center'> | ||
| <IconMoneyBracket width={16} height={16} fill={color.neutral.n800} /> | ||
| <Text variant='body' size='s' textAlign='left'> | ||
| {messages.networkSplitExplainer + ' '} | ||
| <ExternalTextLink to='' variant='visible'> | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can apply all the text styles to external text link and drop the inner text! In fact the wrappping text sets body and size so you don't need to reset those ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's what I was expecting but it didn't work 😕 Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh good to know, that sounds like a bug, will add a ticket | ||
| <Text variant='body' size='s' textAlign='left'> | ||
| {messages.learnMore} | ||
| </Text> | ||
| </ExternalTextLink> | ||
| </Text> | ||
| </Flex> | ||
| ) : null} | ||
| {isEmpty ? ( | ||
| <NoSales /> | ||
| ) : ( | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| import { MouseEvent, useCallback, useMemo } from 'react' | ||
| import { useFeatureFlag } from '@audius/common/hooks' | ||
| import { USDCPurchaseDetails } from '@audius/common/models' | ||
| import { FeatureFlags } from '@audius/common/services' | ||
| import { formatUSDCWeiToUSDString } from '@audius/common/utils' | ||
| import { BN } from 'bn.js' | ||
| import moment from 'moment' | ||
| @@ -139,6 +141,10 @@ export const SalesTable = ({ | ||
| scrollRef, | ||
| fetchBatchSize | ||
| }: SalesTableProps) => { | ||
| const { isEnabled: isNetworkCutEnabled } = useFeatureFlag( | ||
| FeatureFlags.NETWORK_CUT_ENABLED | ||
| ) | ||
| const tableColumns = useMemo( | ||
| () => columns.map((id) => tableColumnMap[id]), | ||
| [columns] | ||
| @@ -169,6 +175,9 @@ export const SalesTable = ({ | ||
| scrollRef={scrollRef} | ||
| fetchBatchSize={fetchBatchSize} | ||
| wrapperClassName={styles.tableWrapper} | ||
| tableHeaderClassName={ | ||
rickyrombo marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| isNetworkCutEnabled ? styles.tableHeaderSmallPadding : undefined | ||
| } | ||
| /> | ||
| ) | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
size=l and color="default" probably?