ghost-portal/packages/page-files/src/index.tsx
Tarik Gul 384049fb6b
2025 (#11172)
* 2025

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

41 lines
883 B
TypeScript

// Copyright 2017-2025 @polkadot/app-files authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { KeyedEvent } from '@polkadot/react-hooks/ctx/types';
import React, { useRef } from 'react';
import { Tabs } from '@polkadot/react-components';
import CrustFiles from './CrustFiles.js';
import { useTranslation } from './translate.js';
interface Props {
basePath: string;
className?: string;
newEvents?: KeyedEvent[];
}
function FilesApp ({ basePath, className }: Props): React.ReactElement<Props> {
const { t } = useTranslation();
const itemsRef = useRef([
{
isRoot: true,
name: 'crust',
text: t('Your Files')
}
]);
return (
<main className={className}>
<Tabs
basePath={basePath}
items={itemsRef.current}
/>
<CrustFiles />
</main>
);
}
export default React.memo(FilesApp);