prettier
This commit is contained in:
		
							parent
							
								
									e3c2e4da1d
								
							
						
					
					
						commit
						762df56aea
					
				| @ -11,9 +11,7 @@ type Props = { | ||||
|   href?: string; | ||||
| }; | ||||
| 
 | ||||
| export default function LanguageSwitcher( | ||||
|   props: Props | ||||
| ): JSX.Element { | ||||
| export default function LanguageSwitcher(props: Props): JSX.Element { | ||||
|   const { locales, langui, href } = props; | ||||
|   const router = useRouter(); | ||||
| 
 | ||||
|  | ||||
| @ -1,10 +1,10 @@ | ||||
| query getVideosSlugs { | ||||
| 	videos(pagination: {limit:-1}) { | ||||
| 		data { | ||||
| 			id | ||||
| 			attributes { | ||||
| 				uid | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|   videos(pagination: { limit: -1 }) { | ||||
|     data { | ||||
|       id | ||||
|       attributes { | ||||
|         uid | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -86,7 +86,11 @@ export default function Video(props: Props): JSX.Element { | ||||
|           id="video" | ||||
|           className="w-full rounded-xl shadow-shade shadow-lg overflow-hidden" | ||||
|         > | ||||
|           <video className="w-full" src={getVideoFile(video.uid)} controls></video> | ||||
|           <video | ||||
|             className="w-full" | ||||
|             src={getVideoFile(video.uid)} | ||||
|             controls | ||||
|           ></video> | ||||
|           <div className="p-6 mt-2"> | ||||
|             <h1 className="text-2xl">{video.title}</h1> | ||||
|             <div className="flex flex-row flex-wrap gap-x-6 w-full"> | ||||
| @ -114,7 +118,10 @@ export default function Video(props: Props): JSX.Element { | ||||
|                     : video.likes.toLocaleString()} | ||||
|                 </p> | ||||
|               )} | ||||
|               <Button href="" className="!py-0 !px-3">{`View on ${video.source}`}</Button> | ||||
|               <Button | ||||
|                 href="" | ||||
|                 className="!py-0 !px-3" | ||||
|               >{`View on ${video.source}`}</Button> | ||||
|             </div> | ||||
|           </div> | ||||
|         </div> | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| import AppLayout from "components/AppLayout"; | ||||
| import HorizontalLine from "components/HorizontalLine"; | ||||
| import PanelHeader from "components/PanelComponents/PanelHeader"; | ||||
| import ReturnButton, { | ||||
|   ReturnButtonType, | ||||
|  | ||||
| @ -235,9 +235,11 @@ export function prettyShortenNumber(number: number): string { | ||||
|       maximumSignificantDigits: 3, | ||||
|     }); | ||||
|   } else if (number > 1000) { | ||||
|     return (number / 1000).toLocaleString(undefined, { | ||||
|       maximumSignificantDigits: 2, | ||||
|     }) + "K"; | ||||
|     return ( | ||||
|       (number / 1000).toLocaleString(undefined, { | ||||
|         maximumSignificantDigits: 2, | ||||
|       }) + "K" | ||||
|     ); | ||||
|   } | ||||
|   return number.toLocaleString(); | ||||
| } | ||||
| @ -449,10 +451,10 @@ export function getLocalesFromLanguages( | ||||
|     : []; | ||||
| } | ||||
| 
 | ||||
| export function getVideoThumbnailURL(uid: string):string { | ||||
| export function getVideoThumbnailURL(uid: string): string { | ||||
|   return `${process.env.NEXT_PUBLIC_URL_WATCH}/videos/${uid}.webp`; | ||||
| } | ||||
| 
 | ||||
| export function getVideoFile(uid: string):string { | ||||
| export function getVideoFile(uid: string): string { | ||||
|   return `${process.env.NEXT_PUBLIC_URL_WATCH}/videos/${uid}.mp4`; | ||||
| } | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 DrMint
						DrMint