Run prettier
This commit is contained in:
		
							parent
							
								
									44f661a94e
								
							
						
					
					
						commit
						992c245837
					
				| 
						 | 
				
			
			@ -1,10 +1,7 @@
 | 
			
		|||
module.exports = {
 | 
			
		||||
  parser: '@typescript-eslint/parser',
 | 
			
		||||
  extends: [
 | 
			
		||||
	  'plugin:react-hooks/recommended',
 | 
			
		||||
	  'plugin:@next/next/recommended',
 | 
			
		||||
	],
 | 
			
		||||
  extends: ['plugin:react-hooks/recommended', 'plugin:@next/next/recommended'],
 | 
			
		||||
  rules: {
 | 
			
		||||
	  // Add or disable rules here.
 | 
			
		||||
  }
 | 
			
		||||
    // Add or disable rules here.
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										3
									
								
								web/.prettierignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								web/.prettierignore
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,3 @@
 | 
			
		|||
# Ignore Next artifacts
 | 
			
		||||
.next/
 | 
			
		||||
out/
 | 
			
		||||
| 
						 | 
				
			
			@ -2,12 +2,13 @@ import { useEffect, useState } from 'react'
 | 
			
		|||
import { Contract, listenForContract } from '../lib/firebase/contracts'
 | 
			
		||||
 | 
			
		||||
export const useContract = (contractId: string) => {
 | 
			
		||||
	const [contract, setContract] = useState<Contract | null | 'loading'>('loading')
 | 
			
		||||
  const [contract, setContract] = useState<Contract | null | 'loading'>(
 | 
			
		||||
    'loading'
 | 
			
		||||
  )
 | 
			
		||||
 | 
			
		||||
	useEffect(() => {
 | 
			
		||||
		if (contractId)
 | 
			
		||||
			return listenForContract(contractId, setContract)
 | 
			
		||||
	}, [contractId])
 | 
			
		||||
  useEffect(() => {
 | 
			
		||||
    if (contractId) return listenForContract(contractId, setContract)
 | 
			
		||||
  }, [contractId])
 | 
			
		||||
 | 
			
		||||
	return contract
 | 
			
		||||
  return contract
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -2,11 +2,11 @@ import { useEffect, useState } from 'react'
 | 
			
		|||
import { listenForLogin, User } from '../lib/firebase/users'
 | 
			
		||||
 | 
			
		||||
export const useUser = () => {
 | 
			
		||||
	const [user, setUser] = useState<User | null>(null)
 | 
			
		||||
  const [user, setUser] = useState<User | null>(null)
 | 
			
		||||
 | 
			
		||||
	useEffect(() => {
 | 
			
		||||
		return listenForLogin(setUser)
 | 
			
		||||
	}, [])
 | 
			
		||||
  useEffect(() => {
 | 
			
		||||
    return listenForLogin(setUser)
 | 
			
		||||
  }, [])
 | 
			
		||||
 | 
			
		||||
	return user
 | 
			
		||||
  return user
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user