12 lines
273 B
TypeScript
12 lines
273 B
TypeScript
import type { useRouter } from "expo-router"
|
|
|
|
type AppRouter = ReturnType<typeof useRouter>
|
|
|
|
export async function signOutToSignIn(
|
|
router: Pick<AppRouter, "replace">,
|
|
invalidateSession: () => Promise<void>
|
|
) {
|
|
await invalidateSession()
|
|
router.replace("/signin")
|
|
}
|