'use client'; import AdminShell from '@/components/AdminShell'; import { useState } from 'react'; import { Settings, Globe, Key } from 'lucide-react'; export default function SettingsPage() { const [apiUrl, setApiUrl] = useState( typeof window !== 'undefined' ? localStorage.getItem('admin_api_url') || '' : '' ); const [saved, setSaved] = useState(false); const handleSaveApiUrl = () => { if (typeof window !== 'undefined') { if (apiUrl.trim()) { localStorage.setItem('admin_api_url', apiUrl.trim()); } else { localStorage.removeItem('admin_api_url'); } setSaved(true); setTimeout(() => setSaved(false), 2000); } }; return (

Settings

Admin panel configuration

{/* API Configuration */}

API Connection

setApiUrl(e.target.value)} />

Override the default API URL. Leave blank to use the default from environment variables.

{saved && Saved!}
{/* Session Info */}

Session

Token stored {typeof window !== 'undefined' && localStorage.getItem('admin_token') ? 'Yes' : 'No'}
API URL {process.env.NEXT_PUBLIC_API_URL || 'https://api.sojorn.net'}
{/* About */}

About

Sojorn Admin Panel v1.0.0

Built with Next.js, React, TypeScript, and TailwindCSS

Backend: Go (Gin) + PostgreSQL

); }