import { userPreferencesService } from '@/services/user-preferences';
import { tagsService } from '@/services/tags';
import { GeneralSettingsPageClient } from '@/components/settings/GeneralSettingsPageClient';

// Force dynamic rendering for real-time data
export const dynamic = 'force-dynamic';

export default async function GeneralSettingsPage() {
  // Fetch data server-side
  const [preferences, tags] = await Promise.all([
    userPreferencesService.getAllPreferences(),
    tagsService.getTags()
  ]);

  return <GeneralSettingsPageClient initialPreferences={preferences} initialTags={tags} />;
}
