Skip to content

Commit

Permalink
Updated dependencies and refactored App.jsx to use a new component
Browse files Browse the repository at this point in the history
  • Loading branch information
IGuy37 committed Jun 27, 2024
1 parent 4d6ee93 commit bb828b6
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 10 deletions.
41 changes: 40 additions & 1 deletion react-client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion react-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"dependencies": {
"bootstrap": "^5.3.3",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react-dom": "^18.3.1",
"react-router-dom": "^6.24.0"
},
"devDependencies": {
"@types/react": "^18.3.3",
Expand Down
10 changes: 2 additions & 8 deletions react-client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,8 @@ export default function App() {
))
}
</div>
<div className="card-container" style={{ display: 'flex', flexWrap: 'wrap', gap: '20px' }}>
{
data.map((sock) => (
<Sock key={sock._id} data={sock} handleDelete={handleDelete}/>
))
}
</div>
<Footer environment={import.meta.env.VITE_ENVIRONMENT}/>
<Home data={data} handleDelete={handleDelete} />
<Footer environment={import.meta.env.VITE_ENVIRONMENT}/>
</div>
</div>
</main>
Expand Down
13 changes: 13 additions & 0 deletions react-client/src/components/Home.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Sock from "./Sock"

export default function Home({data, handleDelete}) {
return(
<div className="card-container" style={{ display: 'flex', flexWrap: 'wrap', gap: '20px' }}>
{
data.map((sock) => (
<Sock key={sock._id} data={sock} handleDelete={handleDelete}/>
))
}
</div>
);
}

0 comments on commit bb828b6

Please sign in to comment.