Skip to content

Commit 7cbc6f3

Browse files
committed
Add branding to accept invite page
1 parent 50de1b7 commit 7cbc6f3

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

app/routes/user.accept-invite.$inviteId.$code.tsx

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,17 @@ export const loader: LoaderFunction = async ({ params }) => {
9898
});
9999
}
100100

101-
return json({ invite });
101+
const org = await prisma.organisation.findUnique({
102+
where: {
103+
id: 1,
104+
},
105+
});
106+
107+
return json({ invite, org });
102108
}
103109

110+
// @todo load org and add imprint/privacy footer
111+
104112
// Got here?
105113
throw new Response(null, {
106114
status: 404,
@@ -109,10 +117,21 @@ export const loader: LoaderFunction = async ({ params }) => {
109117
};
110118

111119
export default function AcceptInvitationPage() {
112-
const { invite } = useLoaderData<typeof loader>();
120+
const { invite, org } = useLoaderData<typeof loader>();
113121

114122
return (
115123
<Layout type="modal">
124+
<svg
125+
className="w-12 h-12 grow"
126+
width="120"
127+
height="120"
128+
viewBox="0 0 120 120"
129+
fill="currentColor"
130+
xmlns="http://www.w3.org/2000/svg"
131+
>
132+
<path d="M39.9792 71.8087V0.309998H10.0082V71.8087C9.88754 78.7518 11.0948 85.654 13.5649 92.144C15.7741 97.81 19.1859 102.929 23.5651 107.149C28.0804 111.375 33.4587 114.572 39.3289 116.519C45.9974 118.74 52.9908 119.829 60.0189 119.741V92.3115C54.1075 92.2721 49.3061 90.4987 45.6147 86.9912C41.9234 83.4838 40.0448 78.4229 39.9792 71.8087ZM109.931 0.309998H79.9995V67.7594H110L109.931 0.309998ZM106.374 92.4297C104.165 86.7608 100.754 81.6381 96.3742 77.4147C91.8583 73.1915 86.48 69.9982 80.6104 68.0549C73.9424 65.8306 66.949 64.7383 59.9204 64.8234V92.3115C65.8318 92.3115 70.6365 94.0849 74.3344 97.6318C78.0323 101.179 79.8944 106.236 79.9207 112.804V118.164H109.921V112.804C110.074 105.853 108.893 98.9368 106.443 92.4297H106.374Z" />
133+
</svg>
134+
116135
<Card className="mx-auto max-w-sm">
117136
<CardHeader>
118137
<CardTitle className="text-2xl">
@@ -139,6 +158,11 @@ export default function AcceptInvitationPage() {
139158
</CardFooter>
140159
</Form>
141160
</Card>
161+
<div className="text-xs grow flex flex-row items-end pb-12">
162+
{org?.name}&emsp;&middot;&emsp;
163+
<a href={org?.imprintUrl}>Imprint</a>&emsp;&middot;&emsp;
164+
<a href={org?.privacyUrl}>Privacy</a>
165+
</div>
142166
</Layout>
143167
);
144168
}

0 commit comments

Comments
 (0)