File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 55 <img class =" h-36" src =" ../../assets/loading.svg" >
66 </div >
77 <section v-if =" fetchingDone" class =" mx-auto relative md:flex md:items-start md:justify-center" >
8- <div class =" sideBar md:w-full md:max-w-xs md:shadow-md md:rounded-md md:p-8 md:flex md:flex-col md:justify-start" >
8+ <div v-if = " (isSmallScreen && !chatWithUserId) || !isSmallScreen " class =" sideBar md:w-full md:max-w-xs md:shadow-md md:rounded-md md:p-8 md:flex md:flex-col md:justify-start" >
99 <div class =" mt-8 sm:mt-0" >
1010 <div v-if =" matches.length" >
1111 <h1 class =" text-xl md:text-base text-gray-matcha font-bold" >Matches</h1 >
@@ -84,6 +84,7 @@ export default {
8484 messages: [],
8585 chatWithUserId: null ,
8686 fetchingDone: false ,
87+ isSmallScreen: false ,
8788 }),
8889 watch: {
8990 messages: {
@@ -193,6 +194,7 @@ export default {
193194 this .chatWithUserId = this .messages [0 ].with_user .id ;
194195 }
195196 }
197+ this .isSmallScreen = window .innerWidth < 768 ;
196198 },
197199 async fetchData () {
198200 window .addEventListener (' resize' , this .openMessageOnMd );
@@ -203,6 +205,9 @@ export default {
203205 if (window .innerWidth >= 768 && this .messages .length ) {
204206 this .chatWithUserId = this .messages [0 ].with_user .id ;
205207 }
208+ if (window .innerWidth < 768 ) {
209+ this .isSmallScreen = true ;
210+ }
206211 this .fetchingDone = true ;
207212 },
208213 },
You can’t perform that action at this time.
0 commit comments