Fix some loose typing
This commit is contained in:
parent
a31410d2c1
commit
56595757a5
|
@ -170,7 +170,7 @@ type GetServerSidePropsAuthed<P> = (
|
|||
creds: UserCredential
|
||||
) => Promise<GetServerSidePropsResult<P>>
|
||||
|
||||
export const redirectIfLoggedIn = <P>(
|
||||
export const redirectIfLoggedIn = <P extends { [k: string]: any }>(
|
||||
dest: string,
|
||||
fn?: GetServerSideProps<P>
|
||||
) => {
|
||||
|
@ -191,7 +191,7 @@ export const redirectIfLoggedIn = <P>(
|
|||
}
|
||||
}
|
||||
|
||||
export const redirectIfLoggedOut = <P>(
|
||||
export const redirectIfLoggedOut = <P extends { [k: string]: any }>(
|
||||
dest: string,
|
||||
fn?: GetServerSidePropsAuthed<P>
|
||||
) => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user