ghost-portal/packages/apps/src/overlays/LocalFork.tsx
Tarik Gul 384049fb6b
2025 (#11172)
* 2025

* update ci scripts to add access to scripts
2025-01-03 03:59:53 +02:00

47 lines
973 B
TypeScript

// Copyright 2017-2025 @polkadot/apps authors & contributors
// SPDX-License-Identifier: Apache-2.0
import React from 'react';
import { useApi } from '@polkadot/react-hooks';
import { useTranslation } from '../translate.js';
import BaseOverlay from './Base.js';
interface Props {
className?: string;
}
function LocalFork ({ className }: Props): React.ReactElement<Props> | null {
const { t } = useTranslation();
const { isLocalFork } = useApi();
if (isLocalFork) {
return (
<BaseOverlay
className={className}
icon='link'
isBottom
isFull
type='info'
>
<div>
{t('Local fork powered by ')}
<a
href='https://github.com/AcalaNetwork/chopsticks'
rel='noreferrer'
target='_blank'
>
Chopsticks
</a>
.
</div>
</BaseOverlay>
);
}
return null;
}
export default React.memo(LocalFork);