-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Subscriptions: Add content summary modal to Paid Subscribers importer (…
…#93773) * add modal * renaming things * shows real data * Add attachment and page numbers to the import summary --------- Co-authored-by: Enej Bajgoric <enej.bajgoric@automattic.com>
- Loading branch information
Showing
6 changed files
with
110 additions
and
6 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
36 changes: 36 additions & 0 deletions
36
client/my-sites/importer/newsletter/content-upload/import-summary-modal.tsx
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,36 @@ | ||
import { Button, Modal } from '@wordpress/components'; | ||
|
||
interface ImportSummaryModalProps { | ||
onRequestClose: () => void; | ||
postsNumber: number; | ||
pagesNumber: number; | ||
attachmentsNumber: number; | ||
authorsNumber?: number; | ||
} | ||
|
||
export default function ImportSummaryModal( { | ||
onRequestClose, | ||
postsNumber, | ||
pagesNumber, | ||
attachmentsNumber, | ||
authorsNumber, | ||
}: ImportSummaryModalProps ) { | ||
return ( | ||
<Modal title="All set!" isDismissible={ false } onRequestClose={ onRequestClose } size="medium"> | ||
<p> | ||
We’ve found <strong>{ postsNumber } posts</strong>, <strong>{ pagesNumber } pages</strong>{ ' ' } | ||
and <strong>{ attachmentsNumber } media</strong> to import. | ||
{ authorsNumber && ( | ||
<> | ||
<br /> | ||
Your Substack publication has <strong>{ authorsNumber } authors</strong>. Next, you can | ||
match them with existing site users. | ||
</> | ||
) } | ||
</p> | ||
<Button variant="primary" onClick={ onRequestClose }> | ||
Continue | ||
</Button> | ||
</Modal> | ||
); | ||
} |
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