1
0
Fork 1
mirror of https://github.com/SomboChea/ui synced 2024-06-28 05:55:33 +07:00
verdaccio-ui/src/pages/Version/Version.tsx

25 lines
541 B
TypeScript
Raw Normal View History

import React, { useContext } from 'react';
import Loading from '../../components/Loading/Loading';
import NotFound from '../../components/NotFound';
import VersionLayout from './VersionLayout';
import { DetailContext } from './context';
const Version: React.FC = () => {
const detailContext = useContext(DetailContext);
const { isLoading, hasNotBeenFound } = detailContext;
if (isLoading) {
return <Loading />;
}
if (hasNotBeenFound) {
return <NotFound />;
}
return <VersionLayout />;
};
export default Version;