Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ export const ActiveSale: FunctionComponent<ActiveSaleProps> = ({ sale }) => {

{ webStudioDisableDistributionAndSales && (
<Typography fontWeight={ 500 } variant="subtitle1">
Please end the sale and we&apos;ll return the unsold Stream Tokens
to your wallet.
Please end the sale and we&apos;ll move any earnings and unsold
Stream Tokens to your wallet.
</Typography>
) }

Expand Down Expand Up @@ -145,6 +145,7 @@ export const ActiveSale: FunctionComponent<ActiveSaleProps> = ({ sale }) => {
</>
) }
</Stack>

<EndSaleModal
handleClose={ () => setIsEndSaleModalOpen(false) }
handleEndSale={ handleEndSale }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { FunctionComponent } from "react";
import { useFlags } from "launchdarkly-react-client-sdk";

import { Box, Stack, Typography } from "@mui/material";

import { Button, Modal } from "@newm-web/elements";
import theme from "@newm-web/theme";

Expand All @@ -18,6 +21,8 @@ export const EndSaleModal: FunctionComponent<EndSaleModalProps> = ({
isLoading,
isSoldOut = false,
}) => {
const { webStudioDisableDistributionAndSales } = useFlags();

return (
<Modal isCloseButtonVisible={ false } isOpen={ isOpen } onClose={ handleClose }>
<Box
Expand All @@ -44,18 +49,25 @@ export const EndSaleModal: FunctionComponent<EndSaleModalProps> = ({
Are you sure you want to end your stream token sale?
</Typography>

{ isSoldOut ? (
<Typography variant="subtitle2">
All earnings from your sold out stream token sale will be moved
to your wallet.
</Typography>
) : (
<Typography variant="subtitle2">
The sale will be removed from the Marketplace, and all unsold
stream tokens will be returned to the wallet used when creating
the sale.
</Typography>
) }
<Typography variant="subtitle2">
{ webStudioDisableDistributionAndSales ? (
<>
The sale will be removed from the Marketplace. All earnings
and any unsold stream tokens will be moved to your wallet.
</>
) : isSoldOut ? (
<>
All earnings from your sold out stream token sale will be
moved to your wallet.
</>
) : (
<>
The sale will be removed from the Marketplace, and all unsold
stream tokens will be returned to the wallet used when
creating the sale.
</>
) }
</Typography>
</Stack>
<Stack flexDirection="row" gap={ 1 } justifyContent="end" mt={ 1 }>
<Button
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,63 @@
import { useFlags } from "launchdarkly-react-client-sdk";

import { AlertTitle, Stack, Typography } from "@mui/material";

import { Alert, HorizontalLine } from "@newm-web/elements";
import theme from "@newm-web/theme";

const SaleEndPending = () => (
<Stack sx={ { gap: 2.5, mt: 1 } }>
<Alert>
<AlertTitle color={ theme.colors.blue } sx={ { fontWeight: 600 } }>
You have a stream token sale for this track that is pending
cancellation!
</AlertTitle>
<Typography
color={ theme.colors.blue }
fontWeight={ 500 }
variant="subtitle1"
>
Your sale is now being removed from the Marketplace.
</Typography>
</Alert>
<Typography mt={ 2.5 } variant="subtitle2">
Stream token sales may take several minutes to be removed from the
Marketplace. You will receive an email notification once the sale has been
successfully canceled. Once the cancellation is finalized, you can create
a new stream token sale for this track.
const SunDownAlertTitle = () => (
<AlertTitle
color={ theme.colors.blue }
sx={ { fontWeight: 600, marginBottom: 0 } }
>
<Typography variant="subtitle1">
Your stream token sale is being removed from the Marketplace!
</Typography>
<HorizontalLine />
</Stack>
</AlertTitle>
);

const SaleEndPending = () => {
const { webStudioDisableDistributionAndSales } = useFlags();

return (
<Stack sx={ { gap: 2.5, mt: 1 } }>
<Alert>
{ webStudioDisableDistributionAndSales ? (
<SunDownAlertTitle />
) : (
<>
<AlertTitle color={ theme.colors.blue } sx={ { fontWeight: 600 } }>
You have a stream token sale for this track that is pending
cancellation!
</AlertTitle>
<Typography
color={ theme.colors.blue }
fontWeight={ 500 }
variant="subtitle1"
>
Your sale is now being removed from the Marketplace.
</Typography>
</>
) }
</Alert>
<Typography mt={ 2.5 } variant="subtitle2">
{ webStudioDisableDistributionAndSales ? (
<>
Stream token sales may take several minutes to be removed. You will
receive an email notification once the sale has successfully ended.
</>
) : (
<>
Stream token sales may take several minutes to be removed from the
Marketplace. You will receive an email notification once the sale
has been successfully canceled. Once the cancellation is finalized,
you can create a new stream token sale for this track.
</>
) }
</Typography>
<HorizontalLine />
</Stack>
);
};

export default SaleEndPending;
Loading