Skip to content

Commit 6b069e8

Browse files
committed
history: remove back link on History page
1 parent 49a1ca7 commit 6b069e8

File tree

3 files changed

+4
-28
lines changed

3 files changed

+4
-28
lines changed

app/src/__tests__/components/history/HistoryPage.spec.tsx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,6 @@ describe('HistoryPage', () => {
2121
expect(getByText('Loop History')).toBeInTheDocument();
2222
});
2323

24-
it('should display the back link', () => {
25-
const { getByText } = render();
26-
expect(getByText('Lightning Loop')).toBeInTheDocument();
27-
});
28-
29-
it('should display the back icon', () => {
30-
const { getByText } = render();
31-
expect(getByText('arrow-left.svg')).toBeInTheDocument();
32-
});
33-
3424
it('should display the export icon', () => {
3525
const { getByText } = render();
3626
expect(getByText('download.svg')).toBeInTheDocument();
@@ -45,12 +35,6 @@ describe('HistoryPage', () => {
4535
expect(getByText('Updated')).toBeInTheDocument();
4636
});
4737

48-
it('should navigate back to the Loop Page', () => {
49-
const { getByText } = render();
50-
fireEvent.click(getByText('arrow-left.svg'));
51-
expect(store.router.location.pathname).toBe('/loop');
52-
});
53-
5438
it('should export channels', () => {
5539
const { getByText } = render();
5640
fireEvent.click(getByText('download.svg'));

app/src/components/common/PageHeader.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React, { ReactNode } from 'react';
22
import { observer } from 'mobx-react-lite';
33
import { usePrefixedTranslation } from 'hooks';
4-
import { useStore } from 'store';
54
import { styled } from 'components/theme';
65
import { ArrowLeft, Download, HeaderThree, HelpCircle } from '../base';
76
import Tip from './Tip';
@@ -11,10 +10,9 @@ const Styled = {
1110
display: flex;
1211
justify-content: space-between;
1312
`,
14-
Left: styled.span<{ sidebar?: boolean }>`
13+
Left: styled.span`
1514
flex: 1;
1615
text-align: left;
17-
padding-left: ${props => (props.sidebar ? '0' : '40px')};
1816
`,
1917
Center: styled.span`
2018
flex: 1;
@@ -56,12 +54,11 @@ const PageHeader: React.FC<Props> = ({
5654
onExportClick,
5755
}) => {
5856
const { l } = usePrefixedTranslation('cmps.common.PageHeader');
59-
const { settingsStore } = useStore();
6057

6158
const { Wrapper, Left, Center, Right, BackLink } = Styled;
6259
return (
6360
<Wrapper>
64-
<Left sidebar={settingsStore.sidebarVisible}>
61+
<Left>
6562
{onBackClick && (
6663
<BackLink onClick={onBackClick}>
6764
<ArrowLeft />

app/src/components/history/HistoryPage.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,12 @@ const Styled = {
1414

1515
const HistoryPage: React.FC = () => {
1616
const { l } = usePrefixedTranslation('cmps.history.HistoryPage');
17-
const { uiStore, swapStore } = useStore();
17+
const { swapStore } = useStore();
1818

1919
const { Wrapper } = Styled;
2020
return (
2121
<Wrapper>
22-
<PageHeader
23-
title={l('pageTitle')}
24-
backText={l('backText')}
25-
onBackClick={uiStore.goToLoop}
26-
onExportClick={swapStore.exportSwaps}
27-
/>
22+
<PageHeader title={l('pageTitle')} onExportClick={swapStore.exportSwaps} />
2823
<HistoryList />
2924
</Wrapper>
3025
);

0 commit comments

Comments
 (0)