import type { LoaderFunctionArgs } from "@remix-run/node";
import { json } from "@remix-run/node";

export async function loader({ request }: LoaderFunctionArgs) {
  const url = new URL(request.url);
  const platform = url.searchParams.get('platform');
  const shop = url.searchParams.get('shop');
  
  return json({ 
    message: 'Social route is working!',
    platform,
    shop,
    timestamp: new Date().toISOString()
  });
}

export default function TestSocialRoute() {
  return (
    <div style={{ padding: '2rem', fontFamily: 'Arial, sans-serif' }}>
      <h1>Social Route Test</h1>
      <p>This route is working correctly!</p>
      <p>Check the network tab to see the response data.</p>
    </div>
  );
}


