Skip to content

Commit

Permalink
fix: name wrapper more specifically
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-watters committed Oct 13, 2023
1 parent 29c5d59 commit 230fe46
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/app/features/activity-list/activity-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { convertBitcoinTxsToListType, convertStacksTxsToListType } from './activ
import { NoAccountActivity } from './components/no-account-activity';
import { PendingTransactionList } from './components/pending-transaction-list/pending-transaction-list';
import { SubmittedTransactionList } from './components/submitted-transaction-list/submitted-transaction-list';
import { TabWrapper } from './components/tab-wrapper';
import { ActivityListTabWrapper } from './components/tab-wrapper';
import { TransactionList } from './components/transaction-list/transaction-list';

// TODO: temporary really ugly fix while we address conditional data problem of
Expand Down Expand Up @@ -97,20 +97,20 @@ export function ActivityList() {

if (isInitialLoading)
return (
<TabWrapper padContent>
<ActivityListTabWrapper padContent>
<LoadingSpinner />
</TabWrapper>
</ActivityListTabWrapper>
);

if (!hasTxs)
return (
<TabWrapper padContent>
<ActivityListTabWrapper padContent>
<NoAccountActivity />
</TabWrapper>
</ActivityListTabWrapper>
);

return (
<TabWrapper>
<ActivityListTabWrapper>
{hasSubmittedTransactions && <SubmittedTransactionList txs={submittedTransactions} />}
{hasPendingTransactions && (
<PendingTransactionList
Expand All @@ -125,6 +125,6 @@ export function ActivityList() {
currentBitcoinAddress={nsBitcoinAddress}
/>
)}
</TabWrapper>
</ActivityListTabWrapper>
);
}
7 changes: 5 additions & 2 deletions src/app/features/activity-list/components/tab-wrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { Box } from 'leather-styles/jsx';

interface TabWrapperProps {
interface ActivityListTabWrapperProps {
children: React.ReactNode;
padContent?: boolean;
}

export function TabWrapper({ children, padContent = false }: TabWrapperProps) {
export function ActivityListTabWrapper({
children,
padContent = false,
}: ActivityListTabWrapperProps) {
return (
// Height set based on the height of the empty assets screen
<Box minHeight="477px" py={padContent ? 'space.11' : undefined}>
Expand Down

0 comments on commit 230fe46

Please sign in to comment.