Skip to content

Commit 0d39a9d

Browse files
committed
Adds background image to received invite page
1 parent b800f12 commit 0d39a9d

File tree

1 file changed

+46
-43
lines changed

1 file changed

+46
-43
lines changed

apps/webapp/app/routes/invites.tsx

Lines changed: 46 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { redirectWithSuccessMessage } from "~/models/message.server";
1717
import { requireUser, requireUserId } from "~/services/session.server";
1818
import { invitesPath, rootPath } from "~/utils/pathBuilder";
1919
import { EnvelopeIcon } from "@heroicons/react/20/solid";
20+
import { BackgroundWrapper } from "~/components/BackgroundWrapper";
2021

2122
export const loader = async ({ request }: LoaderFunctionArgs) => {
2223
const user = await requireUser(request);
@@ -98,49 +99,51 @@ export default function Page() {
9899
});
99100

100101
return (
101-
<AppContainer>
102-
<MainCenteredContainer>
103-
<div>
104-
<FormTitle
105-
LeadingIcon={<EnvelopeIcon className="size-6 text-cyan-500" />}
106-
className="mb-0 text-sky-500"
107-
title={simplur`You have ${invites.length} new invitation[|s]`}
108-
/>
109-
{invites.map((invite) => (
110-
<Form key={invite.id} method="post" {...form.props}>
111-
<Fieldset>
112-
<InputGroup className="flex items-center justify-between border-b border-charcoal-800 py-4">
113-
<div className="flex flex-col gap-y-0.5 overflow-hidden">
114-
<Header2 className="truncate">{invite.organization.title}</Header2>
115-
<Paragraph variant="small" className="truncate">
116-
Invited by {invite.inviter.displayName ?? invite.inviter.email}
117-
</Paragraph>
118-
<input name="inviteId" type="hidden" value={invite.id} />
119-
</div>
120-
<div className="flex flex-col gap-y-1">
121-
<Button
122-
type="submit"
123-
name={conform.INTENT}
124-
value="accept"
125-
variant={"primary/small"}
126-
>
127-
Accept
128-
</Button>
129-
<Button
130-
type="submit"
131-
name={conform.INTENT}
132-
value="decline"
133-
variant={"secondary/small"}
134-
>
135-
Decline
136-
</Button>
137-
</div>
138-
</InputGroup>
139-
</Fieldset>
140-
</Form>
141-
))}
142-
</div>
143-
</MainCenteredContainer>
102+
<AppContainer className="bg-charcoal-900">
103+
<BackgroundWrapper>
104+
<MainCenteredContainer className="max-w-[26rem] rounded-lg border border-grid-bright bg-background-dimmed p-5 shadow-lg">
105+
<div>
106+
<FormTitle
107+
LeadingIcon={<EnvelopeIcon className="size-6 text-cyan-500" />}
108+
className="mb-0 text-sky-500"
109+
title={simplur`You have ${invites.length} new invitation[|s]`}
110+
/>
111+
{invites.map((invite) => (
112+
<Form key={invite.id} method="post" {...form.props}>
113+
<Fieldset>
114+
<InputGroup className="flex items-center justify-between border-b border-charcoal-800 py-4">
115+
<div className="flex flex-col gap-y-0.5 overflow-hidden">
116+
<Header2 className="truncate">{invite.organization.title}</Header2>
117+
<Paragraph variant="small" className="truncate">
118+
Invited by {invite.inviter.displayName ?? invite.inviter.email}
119+
</Paragraph>
120+
<input name="inviteId" type="hidden" value={invite.id} />
121+
</div>
122+
<div className="flex flex-col gap-y-1">
123+
<Button
124+
type="submit"
125+
name={conform.INTENT}
126+
value="accept"
127+
variant={"primary/small"}
128+
>
129+
Accept
130+
</Button>
131+
<Button
132+
type="submit"
133+
name={conform.INTENT}
134+
value="decline"
135+
variant={"secondary/small"}
136+
>
137+
Decline
138+
</Button>
139+
</div>
140+
</InputGroup>
141+
</Fieldset>
142+
</Form>
143+
))}
144+
</div>
145+
</MainCenteredContainer>
146+
</BackgroundWrapper>
144147
</AppContainer>
145148
);
146149
}

0 commit comments

Comments
 (0)