9494</template >
9595
9696<script >
97- /* eslint-disable */
97+ /* eslint-disable prefer-const */
9898import Introduction from ' @/components/app/onboarding/Introduction.vue' ;
9999import SingleChoice from ' @/components/app/onboarding/SingleChoice.vue' ;
100100import MultipleChoice from ' @/components/app/onboarding/MultipleChoice.vue' ;
101101import MainAndSecondaryImagesUpload from ' @/components/app/onboarding/MainAndSecondaryImagesUpload.vue' ;
102102import Textblock from ' @/components/app/onboarding/Textblock.vue' ;
103- import Location from " @/components/app/onboarding/Location.vue" ;
104- import SettingUp from " @/components/app/onboarding/SettingUp.vue" ;
103+ import Location from ' @/components/app/onboarding/Location.vue' ;
104+ import SettingUp from ' @/components/app/onboarding/SettingUp.vue' ;
105105import Vue from ' vue' ;
106+ import Browse from ' @/views/app/Browse.vue' ;
106107
107108export default {
108109 components: {
@@ -126,8 +127,6 @@ export default {
126127 let [key, value] = args;
127128 if (key === ' birthdate' ) {
128129 value = this .formatBirthdate (value);
129- } else if (key === ' location' ) {
130- value = this .processLocation (value);
131130 }
132131 this .userData [key] = value;
133132 this .nextSlide ();
@@ -137,9 +136,10 @@ export default {
137136 this .slideCurrent += 1 ;
138137 await this .bus .$emit (' sendUserLocationToBackend' );
139138 await this .$http .post (' /profile/complete' , this .userData );
140- await this .$http .get (' /recommendations' );
139+ const recommendationsRequest = await this .$http .get (' /recommendations' );
140+ const recommendationsFromSettingUp = recommendationsRequest .data .recommendations ;
141141 await this .$store .dispatch (' profileCompleted' );
142- await this .$router .push (' /browse ' );
142+ await this .$router .push ({ name : Browse, params : { recommendationsFromSettingUp } } );
143143 }
144144 if (this .slideCurrent < this .slideCount ) {
145145 if (this .slideCurrent === 4 && this .userUploadedImagesCount ) {
@@ -157,16 +157,9 @@ export default {
157157 return ages;
158158 },
159159 formatBirthdate (age ) {
160- let birthyear = new Date ().getFullYear () - age;
161- return ' 01/01/' + birthyear;
160+ const birthyear = new Date ().getFullYear () - age;
161+ return ` 01/01/${ birthyear} ` ;
162162 },
163- processLocation (allowAccessToLocation ) {
164- if (allowAccessToLocation) {
165- navigator .geolocation .getCurrentPosition (function (position ) {
166- console .log (position .coords .latitude + position .coords .longitude );
167- });
168- }
169- }
170163 },
171164 computed: {
172165 buttonText () {
0 commit comments