mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-04 20:05:50 +00:00
Add AmendmentDisclaimer component
This commit is contained in:
@@ -139,6 +139,10 @@ footer.community.report-a-scam: 詐欺の報告
|
||||
|
||||
component.tryit: 試してみる
|
||||
component.queryexampletx: トランザクションの例を確認
|
||||
component.amendment-status.requires.1: " "
|
||||
component.amendment-status.requires.2: が必要です。
|
||||
component.amendment-status.added.1: " "
|
||||
component.amendment-status.added.2: により追加されました。
|
||||
|
||||
# Amendment tracker translations
|
||||
amendment.loading: ロード中Amendments...
|
||||
|
||||
@@ -380,3 +380,29 @@ function AmendmentBadge(props: { amendment: Amendment }) {
|
||||
|
||||
return <img src={badgeUrl} alt={status} className="shield" />;
|
||||
}
|
||||
|
||||
export function AmendmentDisclaimer(props: {
|
||||
name: string,
|
||||
isVoting: boolean
|
||||
}) {
|
||||
const { useTranslate } = useThemeHooks();
|
||||
const { translate } = useTranslate();
|
||||
|
||||
const link = () => <Link to={`/resources/known-amendments#${props.name.toLowerCase()}`}>{props.name} amendment</Link>
|
||||
|
||||
return (
|
||||
<div><i>(
|
||||
{
|
||||
props.isVoting ? (
|
||||
<>
|
||||
{translate("component.amendment-status.requires.1", "Requires the ")}{link()}{translate("component.amendment-status.requires.2", ".")}
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
{translate("component.amendment-status.added.1", "Added by the ")}{link()}{translate("component.amendment-status.added.2", ".")}
|
||||
</>
|
||||
)
|
||||
}
|
||||
)</i></div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -221,3 +221,20 @@ export const amendmentsTable: Schema & { tagName: string } = {
|
||||
render: 'AmendmentsTable',
|
||||
selfClosing: true
|
||||
}
|
||||
|
||||
export const amendmentDisclaimer: Schema & { tagName: string } = {
|
||||
tagName: 'amendment-disclaimer',
|
||||
attributes: {
|
||||
name: {
|
||||
type: 'String',
|
||||
required: true
|
||||
},
|
||||
isVoting: {
|
||||
type: 'Boolean',
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
render: 'AmendmentDisclaimer',
|
||||
selfClosing: true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user