Skip to content

Commit 8bed0c1

Browse files
committed
feat: increase the width of the Vault component for comptaible visual appearance
1 parent bd3c57f commit 8bed0c1

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

src/containers/Vault/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const Page: FC<PropsWithChildren<{ vaultId: string }>> = ({
5050
vaultId,
5151
children,
5252
}) => (
53-
<div className="vault-page">
53+
<div className="vault-page section">
5454
<Helmet title={`Vault ${vaultId.substring(0, 12)}...`} />
5555
{children}
5656
</div>
@@ -96,7 +96,7 @@ export const Vault = () => {
9696
const renderError = () => {
9797
const message = getErrorMessage(error)
9898
return (
99-
<div className="vault-page">
99+
<div className="vault-page section">
100100
<NoMatch title={message.title} hints={message.hints} />
101101
</div>
102102
)

src/containers/Vault/test/Vault.test.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,23 @@ describe('Vault Component', () => {
207207
expect(container.querySelector('.vault-page')).toBeInTheDocument()
208208
})
209209
})
210+
211+
it('applies section class for max-width constraints', async () => {
212+
mockedGetVault.mockResolvedValue(createMockVaultData())
213+
214+
const TestWrapper = createTestWrapper(queryClient, 'TEST_VAULT_ID')
215+
const { container } = render(
216+
<TestWrapper>
217+
<Vault />
218+
</TestWrapper>,
219+
)
220+
221+
await waitFor(() => {
222+
const vaultPage = container.querySelector('.vault-page')
223+
expect(vaultPage).toBeInTheDocument()
224+
expect(vaultPage).toHaveClass('section')
225+
})
226+
})
210227
})
211228

212229
/**

0 commit comments

Comments
 (0)