Fix external links for fellowship referenda (#8468)

* Fix external links for fellowship referenda

* Fix key order
This commit is contained in:
Yongfeng LI 2022-12-04 05:22:26 +08:00 committed by GitHub
parent c316cbc22e
commit 0eeae810fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ const Components: Record<string, React.ComponentType<Props>> = {
};
function Referendum (props: Props): React.ReactElement<Props> {
const { className, value: { id, info } } = props;
const { className, palletReferenda, value: { id, info } } = props;
const Component = useMemo(
() => Components[info.type] || Tuple,
@ -34,7 +34,7 @@ function Referendum (props: Props): React.ReactElement<Props> {
<td className='links media--1000'>
<LinkExternal
data={id}
type='referenda'
type={palletReferenda}
/>
</td>
</tr>