Skip to content

Commit 0936a27

Browse files
committed
UI and auth-middleware updates.
1 parent 681f0bd commit 0936a27

6 files changed

Lines changed: 10 additions & 8 deletions

File tree

apps/web/app/components/Card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function Card({
99
}): JSX.Element {
1010
return (
1111
<div
12-
className={`${className} overflow-y-scroll p-4 rounded-md shadow-md bg-white`}
12+
className={`${className} overflow-y-scroll p-4 rounded-md shadow-md bg-ps-secondary`}
1313
>
1414
{children}
1515
</div>

apps/web/app/components/Prompt/Prompt.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ export default async function Prompt({ promptId }: { promptId: string }) {
99

1010
return (
1111
<div className="mb-6">
12-
<p className="text-lg text-slate-700 italic">
12+
<p className="text-lg text-ps-primary italic">
1313
&ldquo;{prompt.content}&rdquo;
1414
</p>
1515
{prompt.sentAt && (
16-
<p className="text-sm text-slate-400 mt-2">
16+
<p className="text-sm text-ps-primary mt-2">
1717
Sent {new Date(prompt.sentAt).toLocaleDateString()}
1818
</p>
1919
)}

apps/web/app/components/Prompt/PromptContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default function PromptContent({ content }: PromptContentProps) {
2323
The Prompt
2424
</h2>
2525
</div>
26-
<div className="bg-ps-neutral-50 p-6 rounded-lg border-l-4 border-l-ps-primary-500">
26+
<div className="bg-ps-neutral-50 p-2 rounded-lg border-l-4 border-l-ps-primary-500">
2727
<p className="text-xl text-ps-primary italic leading-relaxed">
2828
&ldquo;{content}&rdquo;
2929
</p>

apps/web/app/entry/[promptId]/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ export default async function Entry({ params }: EntryPageProps) {
4747

4848
return (
4949
<Card className="w-full">
50-
<h2 className="text-xl text-slate-600 font-bold mb-4">
50+
<h2 className="text-xl text-ps-primary font-bold mb-4">
5151
{prompt.isOpen ? 'New Entry' : 'Your Entry'}
5252
</h2>
5353
<Prompt promptId={prompt.id} />
5454
{prompt.isOpen ? (
5555
<EntryForm userId={userId} promptId={prompt.id} />
5656
) : (
57-
<div className="mt-4 p-4 bg-slate-50 rounded-md">
58-
<p className="text-slate-700">
57+
<div className="mt-4 p-4 rounded-md">
58+
<p className="text-ps-primary leading-relaxed">
5959
{existingEntry ? existingEntry.content : '...'}
6060
</p>
6161
</div>

apps/web/app/prompt/[id]/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ export default async function PromptDetail({ params }: PromptPageProps) {
3434
<div className="bg-ps-secondary rounded-lg border-ps p-8 mb-6 border shadow-md">
3535
<PromptHeader prompt={prompt} />
3636
<PromptContent content={prompt.content} />
37-
<PromptResponse
37+
<hr className="my-6 border-ps-border" />
38+
<PromptResponse
3839
promptId={id}
3940
isOpen={prompt.isOpen}
4041
existingEntry={existingEntry}

apps/web/lib/auth-middleware.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export async function validateTokenForMiddleware(
3939

4040
return payload;
4141
} catch (error) {
42+
console.error('Error validating token in middleware:', error);
4243
// Don't log detailed errors in middleware for security
4344
return null;
4445
}

0 commit comments

Comments
 (0)