κ³ λ Ήν μ¬νκ° λμ΄κ°κ³ μλ μ§κΈ 건κ°κ΄λ¦¬λ μ νμ΄ μλ νμκ° λμ΄ κ°κ³ μμ΅λλ€.
μ°λ¦¬κ° κ°λ°ν μ΄λλ©μ΄νΈ μΉμ±μ μΉμΊ μ ν΅ν΄ μ€μκ°μΌλ‘ μ¬μ©μμ μμΈλ₯Ό κ΅μ ν΄μ€ μ μμ΅λλ€.
κ·Έλ¦¬κ³ λ©μ΄νΈλ€κ³Ό ν¨κ» νλ μ΄λμ ν΅ν΄ μ΄λμ λν μ¦κ±°μμ μ€λλ€.
κ²°κ³Όμ μΌλ‘ λ¨κΈ°μ μΈ μ΄λμ΄ μλ μ₯κΈ°μ μΌλ‘ μ΄λμ ν μ μλλ‘ λκΈ°λΆμ¬λ₯Ό μ€λλ€.
μ΄λ κΈ°λ‘ μ μ₯λ λ©μ΄νΈ ν μ 보곡μ κΈ°λ₯μ ν΅ν΄ μ¬μ©μκ° νΌμμ ν λ λΏλ§ μλλΌ
λ©μ΄νΈμ ν¨κ» μ΄λ νν©μ 곡μ νλ©° λκΈ°λΆμ¬λ₯Ό λ°μ μ μλλ‘ ν©λλ€
μ¬μ©μκ° μ νν μ΄λ 리μ€νΈ νμ΄μ§, μ΄λ(μ€μΏΌνΈ)νλ νμ΄μ§, λͺ¨λ μ΄λ μ ν νμ΄μ§
μ΄λ μ ν ν λͺ©ν μ€μ νμ΄μ§, νκ³ μΆμ μ΄λ μ ν νμ΄μ§
κ°μ νμ§ μμ λ©μ΄νΈ ν λͺ©λ‘ νμ΄μ§, κ°μ ν λ©μ΄νΈ ν λͺ©λ‘ νμ΄μ§, κ²μκΈ μμ
κ²μκΈ μμ Ξμμ λͺ¨λ¬, κ²μκΈ μ λ‘λ, κ²μν κΈ μμ±
κ³΅μ§ νμ΄μ§, 곡μ§κΈ μμ±, κ³΅μ§ μμ
κ³΅μ§ μμ Ξμμ λͺ¨λ¬, λ€λ₯Έ μ¬μ©μ μ 보 νμ΄μ§, λ©μ΄νΈ ν
SNS νΌλ νμ΄μ§, SNSμ μμ±ν λκΈ μμ , μ΅λͺ κ²μν
μμ κ²μν, μ±ν , λ©μ΄νΈ ν λ§λ€κΈ°
νμλͺ©λ‘ νμ΄μ§
μ μ κ³ λ―Ό μμ , μ μ κΈ°λ³Έ μ 보 μμ , μ μ μΈλΆμ 보(μμ : λμ΄) μμ
μ μ μ 보, μ μ μ 보 κ³΅κ° μ¬λΆ μ€μ , μ μ μ 보 μμ νμ΄μ§
νλ‘μ 리μ€νΈ
λ‘κ·ΈμΈ νμ΄μ§, μΈλΆ μ 보 μ λ ₯ μ¬λΆ, μμΈν μ 보 μ λ ₯
μ£Όλ‘ νλ μ΄λ μ λ ₯ νμ΄μ§ , νμκ°μ μλ£μ νμ£½ ν°μ§, ν΄κ²°νκ³ μΆμ κ³ λ―Ό μ λ ₯ νμ΄μ§
νμκ°μ νμ΄μ§, νμκ°μ μλ£ μλ¦Ό
src
β App.css
β App.js
β App.test.js
β index.css
β index.js
β reportWebVitals.js
β setupTests.js
β
ββassets
β ββexercise //μ΄λ μ΄λ―Έμ§
β ββabdominal
β β crunch.jpg
β β legRaise.jpg
β β plank.jpg
β β
β ββarm
β β dumbbellRow.jpg
β β hammerCurl.jpg
β β pushUp.jpg
β β shoulderPress.jpg
β β
β ββlower
β deadLift.jpg
β lunge.jpg
β squat.jpg
β
ββcomponents //νλ©΄μ ꡬμ±ν μ»΄ν¬λνΈ
β ββaccount
β β DetailSetting.js
β β UserSetting.js
β β
β ββauth
β β Login.js
β β Register.js
β β UserDetail.js
β β UserDetail2.js
β β UserDetail3.js
β β
β ββexercise
β β AiTraining.js
β β EveryExercises.js
β β Examples.js
β β Training.js
β β
β ββHome
β β β Home.js
β β β
β β ββwidget
β β β FollowingUsersExerciseStatus.js
β β β HomeRanking.js
β β β MateTeamExerciseState.js
β β β StateOfMate.js
β β β
β β ββcurrentExercise
β β Current.js
β β CurrentExercise.js
β β GoalSetting.js
β β WishExercise.js
β β
β ββmate
β β β CreateTeam.js
β β β MateTeam.js
β β β MateTeamList.js
β β β MyPosts.js
β β β MyTeam.js
β β β Posts.js
β β β PostUpload.js
β β β RecommendUser.js
β β β UserInformation.js
β β β
β β ββteamDetail
β β Board.js
β β Chat.js
β β Exercise.js
β β Members.js
β β Notice.js
β β TeamDetail.js
β β
β ββprtc
β β Gallery.js
β β GetFirebaseImg.js
β β InputToss.js
β β InputToss2.js
β β Like.js
β β PoseNetprtc.js
β β UploadFirebaseImg.js
β β
β ββranking
β β RankInfo.js
β β Ranking.js
β β
β ββUI
β HorizonLine.js
β LinkBox.js
β Loading.js
β LogoutButton.js
β Modal.js
β NavigationBar.js
β PlusButton.js
β Select.js
β TwoTabNav.js
β UIPackage.js
β UserBox.js
β UserProfile.js
β
ββconfig //κ°μ’
νμΌ
β doughnutChart.js
β exercise.json
β exerciseImagePath.json
β youtubeExerciseUrl.json
β
ββconstants //μμ κ°
β Constants.js
β
ββpages // μ£Όμ νμ΄μ§
β Account.js
β AuthHome.js
β Mate.js
β SelectedExercise.js
β
ββservices //api νΈμΆ, μΈλΆ μλΉμ€ κ΄λ¦¬(firebase)
β api.js
β firebase.js
β
ββstore
β userState.js //μ μ μν κ΄λ¦¬(redux)
β
ββutils //μ¬μ¬μ©λλ ν¨μ
Functions.js
const initialState = {
_id:null,
email: null,
name: null,
token: null,
age: null,
area: null,
sex: null,
weight: null,
height: null,
exercise: null,
wishList: null,
followers: null,
followerNames:null,
following: null,
followingNames:null,
dDay: null,
goals: null,
activeNav:'/',
setting: null,
}
-
ν¨μλͺ κΈ°λ₯ navClick μ μ κ° λ¨Έλ¬Όκ³ μλ νμ΄μ§μ λ€λΉκ²μ΄μ λ° μμ΄μ½ bold login λ‘κ·ΈμΈμ jwt μ μ₯ logout λ‘κ·Έμμμ μ΄κΈ°μν μμ getUserFullInfo λ‘κ·ΈμΈμ μ΄κΈ°μν μ μ₯ putFollow μμ λ νλ‘μ° λ¦¬μ€νΈ μ μ₯ putGoals μμ λ λͺ©ν 리μ€νΈ μ μ₯ updateAttain μ΄λ λͺ©ν μ λ°μ΄νΈ putFollowerNames μμ λ νλ‘μ° μ μ μ΄λ¦ 리μ€νΈ μ μ₯ putFollowingNames μμ λ νλ‘μ μ μ μ΄λ¦ 리μ€νΈ μ μ₯ updateProfile μμ λ νλ‘ν μ 보 μ μ₯ updateAge μμ λ λμ΄ μ 보 μ μ₯ updateArea μμ λ μ§μ μ 보 μ μ₯ updateWeight μμ λ λͺΈλ¬΄κ² μ 보 μ μ₯ updateHeight μμ λ ν€ μ 보 μ μ₯ updateExercise μμ λ μ΄λ μ 보 μ μ₯ updateWishList μμ λ ν΄κ²°νκ³ μΆμ κ³ λ―Ό μ 보 μ μ₯ updateItemPublic μμ λ μΈλΆ μ 보 κ³΅κ° μ¬λΆκ° μ μ₯
//... another code...
const [file, setFile] = useState(null);
const [content, setContent] = useState('');
//... another code...
const uploadImgToFirebase= async (file, fileName) => {
if(file==null) return
const fileRef=ref(storage, fileName)
await uploadBytes(fileRef, file)
}
const handleSubmit= async () => {
setIsLoading(true)
try{
const headers=functions.getJWT()
const fileName=`images/${file.name}`
await axios.post(UPLOAD_USER_POST, {
fileName: fileName, //dbμ μ¬μ§ μ΄λ¦λ§ μ μ₯νκ³ firebaseμ μ€μ μ¬μ§μ μ μ₯
content: content,
}, {headers: headers})
await uploadImgToFirebase(file, fileName)
} catch (e) {
console.log(e)
}
finally {
setIsLoading(false)
navigate(MATE)
}
}
// another code...
/// another code...
const imageName = post?.post.image
useEffect(() => {
const imageRef = ref(storage, imageName)
getDownloadURL(imageRef).then(url => setImage(url)).finally(() => setIsLoading(false))
}, [imageName])
/// another code...