1 parent 2b3b8a8 commit 55a5bddCopy full SHA for 55a5bdd
1 file changed
app_frontend/data.js
@@ -1,35 +1 @@
1
-export const userQuery = (userId) => {
2
- const query = `*[_type == "user" && _id == '${userId}' ]`;
3
-
4
- return query;
5
-}
6
7
-export const searchQuery = (searchTerm) => {
8
- const query = `*[_type == "pin" && title match '${searchTerm}*' || category match '${searchTerm}*' || about match ]{
9
10
- image {
11
- asset -> {
12
- url
13
- }
14
- } ,
15
- _id,
16
- destination,
17
- postedBy -> {
18
19
- username,
20
- image
21
- },
22
- save[] {
23
- _key,
24
25
26
27
28
29
30
-}`;
31
-return query;
32
33
34
35
-export const feedQuery = `*[_type == '[pin]
0 commit comments