refactor: replace 'preact' with 'react' (#1048)

This commit is contained in:
Aman Harwara
2022-05-30 12:42:52 +05:30
committed by GitHub
parent e74b4953ea
commit 8c368dd96b
231 changed files with 4794 additions and 4302 deletions

View File

@@ -1,8 +1,8 @@
import { AppState } from '@/UIModels/AppState'
import { observer } from 'mobx-react-lite'
import { FunctionComponent } from 'preact'
import { FunctionComponent } from 'react'
import { HistoryLockedIllustration } from '@standardnotes/icons'
import { Button } from '@/Components/Button/Button'
import Button from '@/Components/Button/Button'
const getPlanHistoryDuration = (planName: string | undefined) => {
switch (planName) {
@@ -19,16 +19,18 @@ const getPremiumContentCopy = (planName: string | undefined) => {
return `Version history is limited to ${getPlanHistoryDuration(planName)} in the ${planName} plan`
}
export const RevisionContentLocked: FunctionComponent<{
type Props = {
appState: AppState
}> = observer(({ appState }) => {
}
const RevisionContentLocked: FunctionComponent<Props> = ({ appState }) => {
const { userSubscriptionName, isUserSubscriptionExpired, isUserSubscriptionCanceled } = appState.subscription
return (
<div className="flex w-full h-full items-center justify-center">
<div className="flex flex-col items-center text-center max-w-40%">
<HistoryLockedIllustration />
<div class="text-lg font-bold mt-2 mb-1">Can't access this version</div>
<div className="text-lg font-bold mt-2 mb-1">Can't access this version</div>
<div className="mb-4 color-passive-0 leading-140%">
{getPremiumContentCopy(
!isUserSubscriptionCanceled && !isUserSubscriptionExpired && userSubscriptionName
@@ -49,4 +51,6 @@ export const RevisionContentLocked: FunctionComponent<{
</div>
</div>
)
})
}
export default observer(RevisionContentLocked)