tweak inferSSRProps to not need as const (#591)
				
					
				
			This commit is contained in:
		
							parent
							
								
									e587432894
								
							
						
					
					
						commit
						a9a6d69ba6
					
				
					 4 changed files with 5 additions and 5 deletions
				
			
		|  | @ -242,7 +242,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) => | |||
|   if (!user) { | ||||
|     return { | ||||
|       notFound: true, | ||||
|     } as const; | ||||
|     }; | ||||
|   } | ||||
|   const eventType = await prisma.eventType.findUnique({ | ||||
|     where: { | ||||
|  | @ -271,7 +271,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) => | |||
|   if (!eventType || eventType.hidden) { | ||||
|     return { | ||||
|       notFound: true, | ||||
|     } as const; | ||||
|     }; | ||||
|   } | ||||
| 
 | ||||
|   // check this is the first event
 | ||||
|  |  | |||
|  | @ -1097,7 +1097,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) => | |||
|   if (!eventType) { | ||||
|     return { | ||||
|       notFound: true, | ||||
|     } as const; | ||||
|     }; | ||||
|   } | ||||
| 
 | ||||
|   if (eventType.userId != session.user.id) { | ||||
|  |  | |||
|  | @ -609,7 +609,7 @@ export async function getServerSideProps(context: NextPageContext) { | |||
|       redirect: { | ||||
|         permanent: false, | ||||
|         destination: "/auth/login", | ||||
|       } as const, | ||||
|       }, | ||||
|     }; | ||||
|   } | ||||
|   const user = await prisma.user.findFirst({ | ||||
|  |  | |||
|  | @ -25,7 +25,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) { | |||
|   if (!booking?.user || !booking.eventType) { | ||||
|     return { | ||||
|       notFound: true, | ||||
|     } as const; | ||||
|     }; | ||||
|   } | ||||
| 
 | ||||
|   return { | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Alex Johansson
						Alex Johansson