Skip to content

Commit a2fa77b

Browse files
committed
Refactor Faq component: Update accordion item keys
1 parent f2aaea6 commit a2fa77b

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

client/src/components/FAQ/Faq.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
AccordionTrigger,
66
} from "@/components/ui/accordion"
77

8-
98
export function Faq() {
109
const faqs = [
1110
{
@@ -28,9 +27,9 @@ export function Faq() {
2827
return (
2928
<div className="grid grid-cols-1 md:grid-cols-1 lg:grid-cols-1 relative z-10 py-10 max-w-7xl mx-auto">
3029
<h1>FAQS</h1>
31-
{faqs.map(data => (
32-
<Accordion type="single" collapsible>
33-
<AccordionItem value="item-1">
30+
{faqs.map((data, index) => (
31+
<Accordion key={index} type="single" collapsible>
32+
<AccordionItem value={`item-${index}`}>
3433
<AccordionTrigger>{data.question}</AccordionTrigger>
3534
<AccordionContent>
3635
{data.answer}
@@ -39,6 +38,5 @@ export function Faq() {
3938
</Accordion>
4039
))}
4140
</div>
42-
4341
);
4442
}

client/src/main.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
import './index.css'
2-
import ReactDOM from 'react-dom';
1+
import './index.css';
2+
import ReactDOM from 'react-dom/client';
33
import App from './App';
44
import { Provider } from 'react-redux';
5-
import store from './lib/store'; // Import the Redux store
5+
import store from './lib/store';
66

7-
ReactDOM.render(
8-
<Provider store={store}> {/* Provide the store to your app */}
7+
const container = document.getElementById('root');
8+
const root = ReactDOM.createRoot(container!);
9+
10+
root.render(
11+
<Provider store={store}>
912
<App />
10-
</Provider>,
11-
document.getElementById('root')
12-
);
13+
</Provider>
14+
);

server/.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.env
2+
chat.db
3+
venv/

server/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ COPY . .
1010

1111
EXPOSE 5000
1212

13-
CMD ["flask", "run"]
13+
CMD ["flask", "run", "--host=0.0.0.0"]

0 commit comments

Comments
 (0)