-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from yapp-project/drinkme#19
Drinkme#19
- Loading branch information
Showing
30 changed files
with
810 additions
and
535 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
export const actions = { | ||
COMMUNICATION: { | ||
REQUEST: "COMMUNICATION_REQUEST", | ||
ING: "COMMUNICATION_ING", | ||
END: "COMMUNICATION_END", | ||
ERROR: "COMMUNICATION_ERROR" | ||
}, | ||
SEARCH: { | ||
REQUEST: "SEARCH_REQUEST", | ||
SUCCESS: "SEARCH_SUCCESS", | ||
FAILED: "SEARCH_FAILED", | ||
TAG: "SEARCH_TAG", | ||
MATERIAL: "SEARCH_MATERIAL" | ||
} | ||
}; | ||
|
||
export function searchRequest(data) { | ||
return { | ||
type: actions.SEARCH.REQUEST, | ||
payload: { | ||
data | ||
} | ||
}; | ||
} | ||
|
||
export function searchSuccess(data) { | ||
return { | ||
type: actions.SEARCH.SUCCESS, | ||
payload: { | ||
data | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import * as webRequestUtil from "./rootAPI"; | ||
|
||
//검색 시 get방식인데 body로 data req가아닌 params 방식으로 해야함 | ||
export async function searchCocktails(word, type) { | ||
let url, body; | ||
if (type === 0) { | ||
url = "recipe/tag/view"; | ||
body = JSON.stringify({ | ||
tag: word | ||
}); | ||
} else { | ||
url = "recipe/ingredient/view"; | ||
} | ||
|
||
const res = await webRequestUtil.get({ url, body }); | ||
return res.data; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
position: fixed; | ||
width: 100%; | ||
height: 100%; | ||
top: 80px; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.