Skip to content
Closed
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
11 changes: 6 additions & 5 deletions src/App.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { render, screen } from '@testing-library/react'
import App from './App'
import { render, screen } from '@testing-library/react';
import App from './App';

test('renders the get started heading', () => {
render(<App />)
expect(screen.getByText('Get started')).toBeInTheDocument()
})
render(<App />);
const headingElement = screen.getByText('Get started');
expect(headingElement).toBeInTheDocument();
});
43 changes: 7 additions & 36 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,43 +1,14 @@
import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from './assets/vite.svg'
import heroImg from './assets/hero.png'
import './App.css'

// Import the tic-tac-toe game component
import TicTacToe from './components/TicTacToe'
import React from 'react';

Check failure on line 1 in src/App.tsx

View workflow job for this annotation

GitHub Actions / test

'React' is declared but its value is never read.
import './App.css';
import TicTacToe from './components/TicTacToe';

function App() {
const [count, setCount] = useState(0)

return (
<>
<section id="center">
<div className="hero">
<img src={heroImg} className="base" width="170" height="179" alt="" />
<img src={reactLogo} className="framework" alt="React logo" />
<img src={viteLogo} className="vite" alt="Vite logo" />
</div>
<div>
<h1>Get started</h1>
<p>
Edit <code>src/App.tsx</code> and save to test <code>HMR</code>
</p>
</div>
<button
className="counter"
onClick={() => setCount((count) => count + 1)}
>
Count is {count}
</button>
</section>

<div className="ticks"></div>

{/* Add the tic-tac-toe game component */}
<div className="app">
<h1>Get started</h1>
<TicTacToe />
</>
</div>
)
}

export default App
export default App;
Loading