Skip to content

Commit a2391d2

Browse files
authored
Merge pull request #6 from laravel/github-actions
Use the latest version of `actions/checkout`
2 parents 6214a7f + 1333eff commit a2391d2

File tree

12 files changed

+28
-27
lines changed

12 files changed

+28
-27
lines changed

.github/workflows/lint.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Code Quality
1+
name: linter
22

33
on:
44
push:
@@ -14,7 +14,7 @@ jobs:
1414
quality:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818

1919
- name: Setup PHP
2020
uses: shivammathur/setup-php@v2
@@ -29,7 +29,7 @@ jobs:
2929
- name: Run Pint
3030
run: vendor/bin/pint
3131

32-
- name: Frontend Format
32+
- name: Frontend Format Check
3333
run: npm run format
3434

3535
- name: Frontend Lint
@@ -39,7 +39,8 @@ jobs:
3939
uses: stefanzweifel/git-auto-commit-action@v5
4040
with:
4141
commit_message: fix code style
42-
commit_options: "--no-verify"
42+
commit_options: '--no-verify'
4343

44+
# We need to run PHPStan after commiting changes as it does not auto-fix errors.
4445
- name: PHPStan
4546
run: ./vendor/bin/phpstan

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020

2121
- name: Setup PHP
2222
uses: shivammathur/setup-php@v2
@@ -26,7 +26,7 @@ jobs:
2626
coverage: xdebug
2727

2828
- name: Setup Node.js
29-
uses: actions/setup-node@v3
29+
uses: actions/setup-node@v4
3030
with:
3131
node-version: '18'
3232
cache: 'npm'

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://cdn.devdojo.com/assets/svg/laravel-react-logo.svg" width="300" alt="Laravel Logo"></a></p>
22

33
<p align="center">
4-
<a href="https://github.com/laravel/react-starter-kit/actions"><img src="https://github.com/laravel/react-starter-kit/workflows/tests/badge.svg" alt="Build Status"></a>
4+
<a href="https://github.com/laravel/react-starter-kit/actions"><img src="https://github.com/laravel/react-starter-kit/workflows/tests/badge.svg" alt="Test Status"></a>
5+
<a href="https://github.com/laravel/react-starter-kit/actions"><img src="https://github.com/laravel/react-starter-kit/workflows/lint/badge.svg" alt="Lint Status"></a>
56
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
67
</p>
78

app/Http/Controllers/Auth/PasswordResetLinkController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use Illuminate\Http\RedirectResponse;
77
use Illuminate\Http\Request;
88
use Illuminate\Support\Facades\Password;
9-
use Illuminate\Validation\ValidationException;
109
use Inertia\Inertia;
1110
use Inertia\Response;
1211

app/Http/Controllers/Auth/VerifyEmailController.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use App\Http\Controllers\Controller;
66
use Illuminate\Auth\Events\Verified;
7-
use Illuminate\Contracts\Auth\MustVerifyEmail;
87
use Illuminate\Foundation\Auth\EmailVerificationRequest;
98
use Illuminate\Http\RedirectResponse;
109

@@ -20,10 +19,9 @@ public function __invoke(EmailVerificationRequest $request): RedirectResponse
2019
}
2120

2221
if ($request->user()->markEmailAsVerified()) {
22+
/** @var \Illuminate\Contracts\Auth\MustVerifyEmail $user */
2323
$user = $request->user();
24-
if ($user instanceof MustVerifyEmail) {
25-
event(new Verified($user));
26-
}
24+
event(new Verified($user));
2725
}
2826

2927
return redirect()->intended(route('dashboard', absolute: false).'?verified=1');

resources/js/components/appearance-dropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default function AppearanceToggleDropdown({ className = '', ...props }: H
2727
<span className="sr-only">Toggle theme</span>
2828
</Button>
2929
</DropdownMenuTrigger>
30-
<DropdownMenuContent align="end" rounded="xl">
30+
<DropdownMenuContent align="end">
3131
<DropdownMenuItem onClick={() => updateAppearance('light')}>
3232
<span className="flex items-center gap-2">
3333
<Sun className="h-5 w-5" />

resources/js/components/appearance-tabs.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Appearance, useAppearance } from '@/hooks/use-appearance';
2+
import { cn } from '@/lib/utils';
23
import { LucideIcon, Monitor, Moon, Sun } from 'lucide-react';
34
import { HTMLAttributes } from 'react';
45

@@ -12,16 +13,17 @@ export default function AppearanceToggleTab({ className = '', ...props }: HTMLAt
1213
];
1314

1415
return (
15-
<div className={`inline-flex gap-1 rounded-lg bg-neutral-100 p-1 dark:bg-neutral-800 ${className}`} {...props}>
16+
<div className={cn('inline-flex gap-1 rounded-lg bg-neutral-100 p-1 dark:bg-neutral-800', className)} {...props}>
1617
{tabs.map(({ value, icon: Icon, label }) => (
1718
<button
1819
key={value}
1920
onClick={() => updateAppearance(value)}
20-
className={`flex items-center rounded-md px-3.5 py-1.5 transition-colors ${
21+
className={cn(
22+
'flex items-center rounded-md px-3.5 py-1.5 transition-colors',
2123
appearance === value
2224
? 'bg-white shadow-sm dark:bg-neutral-700 dark:text-neutral-100'
23-
: 'text-neutral-500 hover:bg-neutral-200/60 hover:text-black dark:text-neutral-400 dark:hover:bg-neutral-700/60'
24-
} `}
25+
: 'text-neutral-500 hover:bg-neutral-200/60 hover:text-black dark:text-neutral-400 dark:hover:bg-neutral-700/60',
26+
)}
2527
>
2628
<Icon className="-ml-1 h-4 w-4" />
2729
<span className="ml-1.5 text-sm">{label}</span>

resources/js/components/input-error.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
import { cn } from '@/lib/utils';
12
import { HTMLAttributes } from 'react';
23

34
export default function InputError({ message, className = '', ...props }: HTMLAttributes<HTMLParagraphElement> & { message?: string }) {
45
return message ? (
5-
<p {...props} className={'text-sm text-red-600 dark:text-red-400 ' + className}>
6+
<p {...props} className={cn('text-sm text-red-600 dark:text-red-400', className)}>
67
{message}
78
</p>
89
) : null;

resources/js/components/nav-main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function NavMain({ items = [] }: { items: NavItem[] }) {
1212
<SidebarMenuItem key={item.title}>
1313
<SidebarMenuButton asChild isActive={item.url === page.url}>
1414
<Link href={item.url} prefetch>
15-
<item.icon />
15+
{item.icon && <item.icon />}
1616
<span>{item.title}</span>
1717
</Link>
1818
</SidebarMenuButton>

resources/js/components/text-link.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { cn } from '@/lib/utils';
12
import { Link } from '@inertiajs/react';
23
import { ComponentProps } from 'react';
34

@@ -6,7 +7,7 @@ type LinkProps = ComponentProps<typeof Link>;
67
export default function TextLink({ className = '', children, ...props }: LinkProps) {
78
return (
89
<Link
9-
className={`underline decoration-neutral-400 underline-offset-2 duration-300 ease-out hover:decoration-neutral-700 ${className}`}
10+
className={cn('underline decoration-neutral-400 underline-offset-2 duration-300 ease-out hover:decoration-neutral-700', className)}
1011
{...props}
1112
>
1213
{children}

0 commit comments

Comments
 (0)