@@ -1,6 +1,6 @@
1import Head from "next/head";
1import Head from "next/head";
2import Link from "next/link";
2import Link from "next/link";
3−import { getPage } from "../../lib/lib";
3+import { getPage, getAllPosts } from "../../lib/lib";
4import { join } from "path";
4import { join } from "path";
5import CopyLink from "../../components/CopyLink";
5import CopyLink from "../../components/CopyLink";
@@ -16,7 +16,7 @@ import MetadataBlock from "../../components/gateway/MetadataBlock";
16import MetadataLink from "../../components/gateway/MetadataLink";
16import MetadataLink from "../../components/gateway/MetadataLink";
17import Description from "../../components/gateway/Description";
17import Description from "../../components/gateway/Description";
19−const ApplicationPage = ({ data, markdown, params }) => {
19+const ApplicationPage = ({ data, markdown, organisation, params }) => {
20 const { application } = params;
20 const { application } = params;
21 if (!ob.isValidPatp(application[0])) {
21 if (!ob.isValidPatp(application[0])) {
22 return <Gateway404 type="application" />;
22 return <Gateway404 type="application" />;
@@ -29,6 +29,31 @@ const ApplicationPage = ({ data, markdown, params }) => {
29 data.title
29 data.title
30 }.png?${reqParams.join("&")}`;
30 }.png?${reqParams.join("&")}`;
38+ href={`/organizations/${organisation.slug}`}
39+ content={organisation.title}
44+ ob.isValidPatp(data?.developer || "") && data?.developer.length <= 14 ? (
47+ href={`/ids/${data.developer}`}
48+ content={data.developer}
53+ content={data.developer ? data.developer : "Unknown"}
33 <Container>
58 <Container>
@@ -76,19 +101,7 @@ const ApplicationPage = ({ data, markdown, params }) => {
79− {ob.isValidPatp(data?.developer || "") &&
104+ {devLink}
80− data?.developer.length <= 14 ? (
83− href={`/ids/${data.developer}`}
84− content={data.developer}
89− content={data.developer ? data.developer : "Unknown"}
92 <CopyLink
105 <CopyLink
93 className="basis-1/2 sm:basis-1/4"
106 className="basis-1/2 sm:basis-1/4"
94 content={data.shortcode ? data.shortcode : data.title}
107 content={data.shortcode ? data.shortcode : data.title}
@@ -119,7 +132,9 @@ const ApplicationPage = ({ data, markdown, params }) => {
119 urbit.org?
132 urbit.org?
121 <Link href="/applications/submit" passHref>
134 <Link href="/applications/submit" passHref>
122− <a className="font-bold text-green-400">Submit your application</a>
135+ <a className="font-bold text-green-400">
136+ Submit your application
125 <Link href="/" passHref>
140 <Link href="/" passHref>
@@ -145,6 +160,11 @@ export const getServerSideProps = async ({ params, res }) => {
146 ) || { data: {}, content: "" };
161 ) || { data: {}, content: "" };
163+ const organisation =
164+ getAllPosts(["title", "slug", "ships"], "organizations").filter((e) =>
165+ e.ships.includes(params.application?.[0])
148 const markdown =
168 const markdown =
149 content !== ""
169 content !== ""
150 ? JSON.stringify(Markdown.parse({ post: { content } }))
170 ? JSON.stringify(Markdown.parse({ post: { content } }))
@@ -161,6 +181,7 @@ export const getServerSideProps = async ({ params, res }) => {
163 markdown,
183 markdown,