mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
26 lines
810 B
TypeScript
26 lines
810 B
TypeScript
import { FC } from 'react';
|
|
import { GetConfigurationValue } from '../../api';
|
|
import { useCatalog } from '../../hooks';
|
|
import { CatalogClassicView } from './CatalogClassicView';
|
|
import { CatalogModernView } from './CatalogModernView';
|
|
|
|
export const CatalogView: FC<{}> = () =>
|
|
{
|
|
const { catalogLocalizationVersion = 0 } = useCatalog();
|
|
const useNewStyle = GetConfigurationValue<boolean>('catalog.style.new', false);
|
|
|
|
if(useNewStyle) return (
|
|
<>
|
|
<div className="hidden" data-catalog-localization-version={ catalogLocalizationVersion } />
|
|
<CatalogModernView />
|
|
</>
|
|
);
|
|
|
|
return (
|
|
<>
|
|
<div className="hidden" data-catalog-localization-version={ catalogLocalizationVersion } />
|
|
<CatalogClassicView />
|
|
</>
|
|
);
|
|
};
|