Skip to content

Commit ec8f4ab

Browse files
committed
fix shit
1 parent 1ebb118 commit ec8f4ab

File tree

3 files changed

+4
-21
lines changed

3 files changed

+4
-21
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/.pnp
66
.pnp.js
77

8+
/.history
89
# testing
910
/coverage
1011

@@ -18,6 +19,7 @@
1819
.env.development.local
1920
.env.test.local
2021
.env.production.local
22+
.env*
2123

2224
npm-debug.log*
2325
yarn-debug.log*

src/data/data.context.tsx

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,6 @@ export function DataContextProvider({ children }: DataContextProviderProps) {
101101
// const examplesArray = await getExamples();
102102
return {
103103
id: d.id,
104-
const getQuestions = async () => {
105-
try {
106-
setLoading(true);
107-
const query = await getDocs(collection(db, "questions"));
108-
const result = query.docs.map((d) => {
109-
const q = d.data();
110-
return {
111104
title: q.title,
112105
tags: q.tags,
113106
categories: q.categories,
@@ -116,11 +109,7 @@ export function DataContextProvider({ children }: DataContextProviderProps) {
116109
description: q.description,
117110
examples: examplesArray
118111
};
119-
}));
120-
121-
122-
};
123-
});
112+
}));
124113
setLoading(false);
125114
setQuestions(result);
126115
setResponse({
@@ -145,13 +134,7 @@ export function DataContextProvider({ children }: DataContextProviderProps) {
145134
[loading, response, questions, getQuestions]
146135
);
147136

148-
}
149-
};
150137

151-
const dataContextProviderValue = useMemo(
152-
() => ({ loading, response, questions, getQuestions }),
153-
[loading, response, questions]
154-
);
155138

156139
return (
157140
<DataContext.Provider value={dataContextProviderValue}>
@@ -164,5 +147,3 @@ export const useData = () => {
164147
return useContext(DataContext);
165148

166149
};
167-
168-
};

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ root.render(
4949
</AuthGuard>
5050
}
5151
/>
52-
/>
52+
5353
<Route
5454
path="/profile"
5555
element={

0 commit comments

Comments
 (0)