a tool for shared writing and social publishing

fix url in legal metadata

+10 -3
+2 -2
app/api/oauth/[route]/oauth-metadata.ts
··· 23 23 client_name: `Leaflet`, 24 24 client_uri: hostname, 25 25 logo_uri: `${hostname}/logo.png`, 26 - tos_uri: `${hostname}/tos`, 27 - policy_uri: `${hostname}/policy`, 26 + tos_uri: `${hostname}/legal?terms`, 27 + policy_uri: `${hostname}/legal?privacy`, 28 28 redirect_uris: 29 29 process.env.NODE_ENV === "development" 30 30 ? [`http://127.0.0.1:3000/api/oauth/callback`]
+8 -1
app/legal/content.tsx
··· 4 4 import Terms from "./terms.mdx"; 5 5 //@ts-ignore 6 6 import Privacy from "./privacy.mdx"; 7 + import { useSearchParams } from "next/navigation"; 7 8 8 9 export const LegalContent = () => { 9 - let [state, setState] = useState<"terms" | "privacy">("terms"); 10 + let searchParams = useSearchParams(); 11 + let tos = searchParams.get("tos") !== null; 12 + let privacy = searchParams.get("privacy") !== null; 13 + console.log(searchParams); 14 + let [state, setState] = useState<"terms" | "privacy">( 15 + privacy ? "privacy" : "terms", 16 + ); 10 17 return ( 11 18 <div className="flex flex-col h-full mx-auto sm:px-4 px-3 sm:py-6 py-4 max-w-prose"> 12 19 <h1 className="pb-4 ">The Legal Stuff</h1>