Skip to content
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

Feat/warning for resolution delay #213

Merged
merged 4 commits into from
Jul 25, 2024
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
5 changes: 4 additions & 1 deletion packages/linea-ens-app/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -386,5 +386,8 @@
},
"dns": {
"refresh": "Refresh DNS"
},
"warning": {
"finalization": "You will be able to use your new domain anywhere ENS is supported once the transaction is finalized on L1. This process takes 8 to 32 hours. <a href='https://docs.linea.build/' style='color:blue;' target='_blank'>Read more</a>"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { useAddRecentTransaction } from '@app/hooks/transactions/useAddRecentTra
import { useRecentTransactions } from '@app/hooks/transactions/useRecentTransactions'
import { useIsSafeApp } from '@app/hooks/useIsSafeApp'
import { useQueryOptions } from '@app/hooks/useQueryOptions'
import { Content } from '@app/layouts/Content'
import {
ManagedDialogProps,
TransactionFlowAction,
Expand Down Expand Up @@ -506,6 +507,17 @@ export const TransactionStageModal = ({
</Outlink>
)}
{lowerError && <Helper type="error">{lowerError}</Helper>}
{stage === 'complete' ? (
<Content title="" hideHeading>
{{
warning: {
type: 'warning',
message: t('warning.finalization'),
},
trailing: <></>,
}}
</Content>
) : null}
</InnerDialog>
<Dialog.Footer
currentStep={currentStep}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { Card } from '@app/components/Card'
import { Button } from '@app/components/styled/Button'
import { Typography } from '@app/components/styled/Typography'
import useWindowSize from '@app/hooks/useWindowSize'
import { Content } from '@app/layouts/Content'

const StyledCard = styled(Card)(
({ theme }) => css`
Expand Down Expand Up @@ -122,6 +123,7 @@ type Props = {

const CompletePoh = ({ name, beautifiedName, callback }: Props) => {
const { t } = useTranslation('register')
const { t: translateCommon } = useTranslation()
const { width, height } = useWindowSize()
const { avatarSrc } = useEthInvoice(name)

Expand Down Expand Up @@ -175,6 +177,15 @@ const CompletePoh = ({ name, beautifiedName, callback }: Props) => {
</Typography>
</TitleContainer>
<Typography>{t('steps.complete.description')}</Typography>
<Content title="" hideHeading>
{{
warning: {
type: 'warning',
message: translateCommon('warning.finalization'),
},
trailing: <></>,
}}
</Content>
<ButtonContainer>
<MobileFullWidth>
<Button data-testid="view-name" onClick={() => callback(true)}>
Expand Down
2 changes: 1 addition & 1 deletion packages/linea-ens-app/src/layouts/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export const Content = ({
const WarningComponent = !loading && warning && (
<WarningWrapper>
<Banner title={warning.title} alert={warning.type}>
{warning.message}
<div dangerouslySetInnerHTML={{ __html: warning.message! }} />
</Banner>
</WarningWrapper>
)
Expand Down
Loading