tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
291
fork
atom
a tool for shared writing and social publishing
291
fork
atom
overview
issues
28
pulls
pipelines
fix url in legal metadata
awarm.space
7 months ago
693bb88c
a846b989
+10
-3
2 changed files
expand all
collapse all
unified
split
app
api
oauth
[route]
oauth-metadata.ts
legal
content.tsx
+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
26
-
tos_uri: `${hostname}/tos`,
27
27
-
policy_uri: `${hostname}/policy`,
26
26
+
tos_uri: `${hostname}/legal?terms`,
27
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
7
+
import { useSearchParams } from "next/navigation";
7
8
8
9
export const LegalContent = () => {
9
9
-
let [state, setState] = useState<"terms" | "privacy">("terms");
10
10
+
let searchParams = useSearchParams();
11
11
+
let tos = searchParams.get("tos") !== null;
12
12
+
let privacy = searchParams.get("privacy") !== null;
13
13
+
console.log(searchParams);
14
14
+
let [state, setState] = useState<"terms" | "privacy">(
15
15
+
privacy ? "privacy" : "terms",
16
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>