File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
frontend/src/components/app/users Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 77 <div v-if =" !user && !error" class =" mx-auto flex items-center justify-center mt-32" >
88 <img class =" h-36" src =" ../../../assets/loading.svg" >
99 </div >
10- <section v-if =" user && !error" class =" mx-auto" >
10+ <section v-if =" user && !error && imagesSorted " class =" mx-auto" >
1111 <div v-on:click =" goBack()" class =" sort-button py-0 ml-auto rounded-md text-lg w-20 md:w-16 mr-4 sm:mr-0 mb-4" >
1212 <h1 class =" noSelect" >←</h1 >
1313 </div >
@@ -30,6 +30,7 @@ export default {
3030 data : () => ({
3131 user: null ,
3232 error: null ,
33+ imagesSorted: false ,
3334 }),
3435 methods: {
3536 goBack () {
@@ -48,15 +49,20 @@ export default {
4849 },
4950 watch: {
5051 async $route () {
52+ this .user = null ;
53+ this .imagesSorted = false ;
5154 const userRequest = await this .$http .get (` /profile/view/${ this .$route .params .id } ` , { accessTokenRequired: true });
5255 this .user = userRequest .data .profile ;
56+ this .sortImages ();
57+ this .imagesSorted = true ;
5358 },
5459 },
5560 async beforeMount () {
5661 try {
5762 const userRequest = await this .$http .get (` /profile/view/${ this .$route .params .id } ` , { accessTokenRequired: true });
5863 this .user = userRequest .data .profile ;
5964 this .sortImages ();
65+ this .imagesSorted = true ;
6066 } catch (error) {
6167 this .error = error .response .data .error .message ;
6268 }
You can’t perform that action at this time.
0 commit comments