Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Remove unused file

Vasek Mlejnsky1342fe0c65e2
diff --git a/apps/docs/src/utils/useSignIn.tsx b/apps/docs/src/utils/useSignIn.tsx
deleted file mode 100644
index a19560679..000000000
--- a/apps/docs/src/utils/useSignIn.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-'use client'
-
-import { useRouter } from 'next/navigation'
-
-export interface Opts {
- view?: string;
- /**
- * Redirect to the current URL after signing in
- * @default Enabled by default
- */
- redirectToCurrentUrl?: boolean;
-}
-
-export function useSignIn() {
- const router = useRouter()
-
- return function signIn(opts?: Opts) {
- let target = '/sign-in'
-
- if (opts?.redirectToCurrentUrl !== false || opts?.view) {
- target += '?'
- }
-
- if (opts?.redirectToCurrentUrl !== false) {
- const url = typeof window !== 'undefined' ? window.location.href : undefined
- target += 'redirect_to=' + encodeURIComponent(url)
- }
-
- if (opts?.redirectToCurrentUrl !== false && opts?.view) {
- target += '&'
- }
-
- if (opts?.view) {
- target += 'view=' + encodeURIComponent(opts.view)
- }
-
- router.push(target, { scroll: true })
- }
-}