2022-11-16 14:36:03 +00:00
|
|
|
import React, { useEffect } from 'react';
|
2023-02-28 18:56:29 +00:00
|
|
|
import { titlefy } from '@vegaprotocol/utils';
|
|
|
|
import { t } from '@vegaprotocol/i18n';
|
2023-03-21 14:50:31 +00:00
|
|
|
import { LocalStoragePersistTabs as Tabs, Tab } from '@vegaprotocol/ui-toolkit';
|
2022-11-16 14:36:03 +00:00
|
|
|
import { Markets } from './markets';
|
|
|
|
import { Proposed } from './proposed';
|
|
|
|
import { usePageTitleStore } from '../../stores';
|
2023-05-02 17:41:21 +00:00
|
|
|
import { Closed } from './closed';
|
2022-11-16 14:36:03 +00:00
|
|
|
|
|
|
|
export const MarketsPage = () => {
|
|
|
|
const { updateTitle } = usePageTitleStore((store) => ({
|
|
|
|
updateTitle: store.updateTitle,
|
|
|
|
}));
|
|
|
|
useEffect(() => {
|
|
|
|
updateTitle(titlefy(['Markets']));
|
|
|
|
}, [updateTitle]);
|
|
|
|
return (
|
2023-07-24 08:37:18 +00:00
|
|
|
<div className="h-full pt-0.5 pb-3 px-1.5">
|
|
|
|
<div className="h-full my-1 border border-default rounded-sm">
|
|
|
|
<Tabs storageKey="console-markets">
|
2023-08-02 12:58:26 +00:00
|
|
|
<Tab id="open-markets" name={t('Open markets')}>
|
2023-07-24 08:37:18 +00:00
|
|
|
<Markets />
|
|
|
|
</Tab>
|
|
|
|
<Tab id="proposed-markets" name={t('Proposed markets')}>
|
|
|
|
<Proposed />
|
|
|
|
</Tab>
|
|
|
|
<Tab id="closed-markets" name={t('Closed markets')}>
|
|
|
|
<Closed />
|
|
|
|
</Tab>
|
|
|
|
</Tabs>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-11-16 14:36:03 +00:00
|
|
|
);
|
|
|
|
};
|