2022-11-16 14:36:03 +00:00
|
|
|
import React, { useEffect } from 'react';
|
|
|
|
import { t, titlefy } from '@vegaprotocol/react-helpers';
|
|
|
|
import { Tabs, Tab } from '@vegaprotocol/ui-toolkit';
|
|
|
|
import { Markets } from './markets';
|
|
|
|
import { Proposed } from './proposed';
|
|
|
|
import { usePageTitleStore } from '../../stores';
|
|
|
|
|
|
|
|
export const MarketsPage = () => {
|
|
|
|
const { updateTitle } = usePageTitleStore((store) => ({
|
|
|
|
updateTitle: store.updateTitle,
|
|
|
|
}));
|
|
|
|
useEffect(() => {
|
|
|
|
updateTitle(titlefy(['Markets']));
|
|
|
|
}, [updateTitle]);
|
|
|
|
return (
|
|
|
|
<Tabs>
|
2023-01-19 18:09:24 +00:00
|
|
|
<Tab id="all-markets" name={t('All markets')}>
|
2022-11-16 14:36:03 +00:00
|
|
|
<Markets />
|
|
|
|
</Tab>
|
|
|
|
<Tab id="proposed-markets" name={t('Proposed markets')}>
|
|
|
|
<Proposed />
|
|
|
|
</Tab>
|
|
|
|
</Tabs>
|
|
|
|
);
|
|
|
|
};
|