Skip to content

Use the latest version of actions/checkout #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Feb 6, 2025
9 changes: 5 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Code Quality
name: linter

on:
push:
Expand All @@ -14,7 +14,7 @@ jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Run Pint
run: vendor/bin/pint

- name: Frontend Format
- name: Frontend Format Check
run: npm run format

- name: Frontend Lint
Expand All @@ -39,7 +39,8 @@ jobs:
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: fix code style
commit_options: "--no-verify"
commit_options: '--no-verify'

# We need to run PHPStan after commiting changes as it does not auto-fix errors.
- name: PHPStan
run: ./vendor/bin/phpstan
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -26,7 +26,7 @@ jobs:
coverage: xdebug

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<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>

<p align="center">
<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>
<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>
<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>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
</p>

Expand Down
1 change: 0 additions & 1 deletion app/Http/Controllers/Auth/PasswordResetLinkController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Password;
use Illuminate\Validation\ValidationException;
use Inertia\Inertia;
use Inertia\Response;

Expand Down
6 changes: 2 additions & 4 deletions app/Http/Controllers/Auth/VerifyEmailController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use App\Http\Controllers\Controller;
use Illuminate\Auth\Events\Verified;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\EmailVerificationRequest;
use Illuminate\Http\RedirectResponse;

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

if ($request->user()->markEmailAsVerified()) {
/** @var \Illuminate\Contracts\Auth\MustVerifyEmail $user */
$user = $request->user();
if ($user instanceof MustVerifyEmail) {
event(new Verified($user));
}
event(new Verified($user));
}

return redirect()->intended(route('dashboard', absolute: false).'?verified=1');
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/appearance-dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function AppearanceToggleDropdown({ className = '', ...props }: H
<span className="sr-only">Toggle theme</span>
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" rounded="xl">
<DropdownMenuContent align="end">
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DropdownMenuContent does not have the rounded prop.
CleanShot 2025-02-06 at 10 12 44

<DropdownMenuItem onClick={() => updateAppearance('light')}>
<span className="flex items-center gap-2">
<Sun className="h-5 w-5" />
Expand Down
10 changes: 6 additions & 4 deletions resources/js/components/appearance-tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Appearance, useAppearance } from '@/hooks/use-appearance';
import { cn } from '@/lib/utils';
import { LucideIcon, Monitor, Moon, Sun } from 'lucide-react';
import { HTMLAttributes } from 'react';

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

return (
<div className={`inline-flex gap-1 rounded-lg bg-neutral-100 p-1 dark:bg-neutral-800 ${className}`} {...props}>
<div className={cn('inline-flex gap-1 rounded-lg bg-neutral-100 p-1 dark:bg-neutral-800', className)} {...props}>
{tabs.map(({ value, icon: Icon, label }) => (
<button
key={value}
onClick={() => updateAppearance(value)}
className={`flex items-center rounded-md px-3.5 py-1.5 transition-colors ${
className={cn(
'flex items-center rounded-md px-3.5 py-1.5 transition-colors',
appearance === value
? 'bg-white shadow-sm dark:bg-neutral-700 dark:text-neutral-100'
: 'text-neutral-500 hover:bg-neutral-200/60 hover:text-black dark:text-neutral-400 dark:hover:bg-neutral-700/60'
} `}
: 'text-neutral-500 hover:bg-neutral-200/60 hover:text-black dark:text-neutral-400 dark:hover:bg-neutral-700/60',
)}
>
<Icon className="-ml-1 h-4 w-4" />
<span className="ml-1.5 text-sm">{label}</span>
Expand Down
3 changes: 2 additions & 1 deletion resources/js/components/input-error.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { cn } from '@/lib/utils';
import { HTMLAttributes } from 'react';

export default function InputError({ message, className = '', ...props }: HTMLAttributes<HTMLParagraphElement> & { message?: string }) {
return message ? (
<p {...props} className={'text-sm text-red-600 dark:text-red-400 ' + className}>
<p {...props} className={cn('text-sm text-red-600 dark:text-red-400', className)}>
{message}
</p>
) : null;
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/nav-main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function NavMain({ items = [] }: { items: NavItem[] }) {
<SidebarMenuItem key={item.title}>
<SidebarMenuButton asChild isActive={item.url === page.url}>
<Link href={item.url} prefetch>
<item.icon />
{item.icon && <item.icon />}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes this.

CleanShot 2025-02-06 at 10 23 16

<span>{item.title}</span>
</Link>
</SidebarMenuButton>
Expand Down
3 changes: 2 additions & 1 deletion resources/js/components/text-link.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { cn } from '@/lib/utils';
import { Link } from '@inertiajs/react';
import { ComponentProps } from 'react';

Expand All @@ -6,7 +7,7 @@ type LinkProps = ComponentProps<typeof Link>;
export default function TextLink({ className = '', children, ...props }: LinkProps) {
return (
<Link
className={`underline decoration-neutral-400 underline-offset-2 duration-300 ease-out hover:decoration-neutral-700 ${className}`}
className={cn('underline decoration-neutral-400 underline-offset-2 duration-300 ease-out hover:decoration-neutral-700', className)}
{...props}
>
{children}
Expand Down
10 changes: 4 additions & 6 deletions resources/js/pages/auth/verify-email.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ export default function VerifyEmail({ status }: { status?: string }) {
};

return (
<AuthLayout>
<AuthLayout
title="Verify Email"
description="Thanks for signing up! Before getting started, could you verify your email address by clicking on the link we just emailed to you? If you didn't receive the email, we will gladly send you another"
>
<Head title="Email Verification" />

<div className="mb-4 text-sm text-gray-600">
Thanks for signing up! Before getting started, could you verify your email address by clicking on the link we just emailed to you? If
you didn't receive the email, we will gladly send you another
</div>

{status === 'verification-link-sent' && (
<div className="mb-4 text-sm font-medium text-green-600">
A new verification link has been sent to the email address you provided during registration
Expand Down
2 changes: 1 addition & 1 deletion resources/js/pages/welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export default function Welcome() {
</main>

<footer className="py-16 text-center text-sm text-black dark:text-white/70">
Laravel v{laravelVersion} (PHP v{phpVersion})
Laravel v{laravelVersion as string} (PHP v{phpVersion as string})
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes this TS error.
CleanShot 2025-02-06 at 10 10 58

</footer>
</div>
</div>
Expand Down