don't 404 for inactive job that user owns
This commit is contained in:
		
							parent
							
								
									74b191837e
								
							
						
					
					
						commit
						d91eb02c74
					
				@ -6,7 +6,7 @@ import { getGetServerSideProps } from '../../../api/ssrApollo'
 | 
				
			|||||||
import { useQuery } from '@apollo/client'
 | 
					import { useQuery } from '@apollo/client'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const getServerSideProps = getGetServerSideProps(ITEM_FULL, null,
 | 
					export const getServerSideProps = getGetServerSideProps(ITEM_FULL, null,
 | 
				
			||||||
  data => !data.item || data.item.status !== 'ACTIVE')
 | 
					  data => !data.item || (data.item.status !== 'ACTIVE' && !data.item.mine))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default function AnItem ({ data: { item } }) {
 | 
					export default function AnItem ({ data: { item } }) {
 | 
				
			||||||
  const { data } = useQuery(ITEM_FULL, {
 | 
					  const { data } = useQuery(ITEM_FULL, {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user