mirror of
				https://github.com/theoludwig/theoludwig.git
				synced 2025-10-14 20:23:25 +02:00 
			
		
		
		
	fix(footer): show 0.0.0-development version in Footer in development
				
					
				
			This commit is contained in:
		| @@ -1,9 +1,10 @@ | ||||
| import { getVersion } from "@/utils/getVersion" | ||||
|  | ||||
| import { FooterText } from "./FooterText" | ||||
| import { FooterVersion } from "./FooterVersion" | ||||
|  | ||||
| export const Footer = async (): Promise<JSX.Element> => { | ||||
|   const { readPackage } = await import("read-pkg") | ||||
|   const { version } = await readPackage() | ||||
|   const version = await getVersion() | ||||
|  | ||||
|   return ( | ||||
|     <footer className="flex flex-col items-center justify-center border-t-2 border-gray-600 bg-white py-6 text-lg dark:border-gray-400 dark:bg-black"> | ||||
|   | ||||
							
								
								
									
										8
									
								
								utils/getVersion.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								utils/getVersion.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| export const getVersion = async (): Promise<string> => { | ||||
|   if (process.env.NODE_ENV === "development") { | ||||
|     return "0.0.0-development" | ||||
|   } | ||||
|   const { readPackage } = await import("read-pkg") | ||||
|   const { version } = await readPackage() | ||||
|   return version | ||||
| } | ||||
		Reference in New Issue
	
	Block a user