Skip to content

Commit

Permalink
Merge branch 'main' into add-starting-example
Browse files Browse the repository at this point in the history
  • Loading branch information
delbaoliveira committed Oct 26, 2023
2 parents a980d6f + 3814b8d commit 44418bc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion dashboard/final-example/app/lib/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export async function fetchRevenue() {
// This is equivalent to in fetch(..., {cache: 'no-store'}).
noStore();
try {
// Artificially delay a response for demo purposes.
// Artificially delay a reponse for demo purposes.
// Don't do this in real life :)

// console.log('Fetching revenue data...');
Expand Down
5 changes: 4 additions & 1 deletion dashboard/final-example/app/ui/login-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { useFormState, useFormStatus } from 'react-dom';

export default function LoginForm() {
const [code, action] = useFormState(authenticate, undefined);
const { pending } = useFormStatus();

return (
<form action={action} className="space-y-3">
Expand Down Expand Up @@ -61,7 +62,9 @@ export default function LoginForm() {
</div>
</div>
</div>
<LoginButton />
<Button className="mt-4 w-full" aria-disabled={pending}>
Log in <ArrowRightIcon className="ml-auto h-5 w-5 text-gray-50" />
</Button>
<div className="flex h-8 items-end space-x-1">
{code === 'CredentialsSignin' && (
<>
Expand Down
2 changes: 1 addition & 1 deletion dashboard/final-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"devDependencies": {
"@types/bcrypt": "^5.0.1",
"@types/react": "18.2.32",
"@types/react": "18.2.21",
"@types/react-dom": "18.2.14",
"dotenv": "^16.3.1",
"prettier": "^3.0.3"
Expand Down
14 changes: 3 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 44418bc

Please sign in to comment.