Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@
}

html {
background-color: #D13B3B;
background-color: #f5f0e6;
}


body {
/**background-color: #272745;*/
background-color: #f5f0e6 ;
color: white;
font-family: "Titillium Web", sans-serif;
margin: 0;
min-height: 100%;
}

button:hover {
Expand Down Expand Up @@ -82,6 +84,12 @@ button:hover {
justify-content: center;
}

.no-drivers-message {
color: #000;
width: 100%;
text-align: center;
}

.standing-drivers {
display: flex;
flex-direction: column;
Expand Down
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function App() {
: driversWithStandingsError
? "Could not load drivers."
: filteredDrivers.length === 0
? "No drivers match your filters."
? <p className="no-drivers-message">No drivers match your filters.</p>
: filteredDrivers.map((driver) => (
<DriverCard
key={driver.driver_number}
Expand Down
6 changes: 3 additions & 3 deletions src/components/DriverDetail.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ test('shows an error', () => {
expect(screen.getByText('Could not load driver details.')).toBeInTheDocument()
})

test('handles no driver', () => {
render(<DriverDetail {...props} driver={undefined} />)
expect(screen.getByText('No driver selected.')).toBeInTheDocument()
test('renders nothing when no driver is selected', () => {
const { container } = render(<DriverDetail {...props} driver={undefined} />)
expect(container).toBeEmptyDOMElement()
})

test('shows team loading', () => {
Expand Down