Use PascalCase for ts(x) component names
This commit is contained in:
parent
0d820c150c
commit
8f168d3bb2
44 changed files with 63 additions and 60 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
import { Breadcrumbs } from '@/components/breadcrumbs';
|
import { Breadcrumbs } from '@/components/Breadcrumbs';
|
||||||
import { Icon } from '@/components/icon';
|
import { Icon } from '@/components/Icon';
|
||||||
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
|
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import {
|
import {
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { NavFooter } from '@/components/nav-footer';
|
import { NavFooter } from '@/components/NavFooter';
|
||||||
import { NavMain } from '@/components/nav-main';
|
import { NavMain } from '@/components/NavMain';
|
||||||
import { NavUser } from '@/components/nav-user';
|
import { NavUser } from '@/components/NavUser';
|
||||||
import {
|
import {
|
||||||
Sidebar,
|
Sidebar,
|
||||||
SidebarContent,
|
SidebarContent,
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Breadcrumbs } from '@/components/breadcrumbs';
|
import { Breadcrumbs } from '@/components/Breadcrumbs';
|
||||||
import { SidebarTrigger } from '@/components/ui/sidebar';
|
import { SidebarTrigger } from '@/components/ui/sidebar';
|
||||||
import { type BreadcrumbItem as BreadcrumbItemType } from '@/types';
|
import { type BreadcrumbItem as BreadcrumbItemType } from '@/types';
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import ProfileController from '@/actions/App/Http/Controllers/Settings/ProfileController';
|
import ProfileController from '@/actions/App/Http/Controllers/Settings/ProfileController';
|
||||||
import HeadingSmall from '@/components/heading-small';
|
import HeadingSmall from '@/components/HeadingSmall';
|
||||||
import InputError from '@/components/input-error';
|
import InputError from '@/components/InputError';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Icon } from '@/components/icon';
|
import { Icon } from '@/components/Icon';
|
||||||
import {
|
import {
|
||||||
SidebarGroup,
|
SidebarGroup,
|
||||||
SidebarGroupContent,
|
SidebarGroupContent,
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import InputError from '@/components/input-error';
|
import InputError from '@/components/InputError';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import AppLayoutTemplate from '@/layouts/app/app-sidebar-layout';
|
import AppLayoutTemplate from '@/layouts/app/AppSidebarLayout';
|
||||||
import { type BreadcrumbItem } from '@/types';
|
import { type BreadcrumbItem } from '@/types';
|
||||||
import { type ReactNode } from 'react';
|
import { type ReactNode } from 'react';
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import AuthLayoutTemplate from '@/layouts/auth/auth-simple-layout';
|
import AuthLayoutTemplate from '@/layouts/auth/AuthSimpleLayout';
|
||||||
|
|
||||||
export default function AuthLayout({
|
export default function AuthLayout({
|
||||||
children,
|
children,
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { AppContent } from '@/components/app-content';
|
import { AppContent } from '@/components/AppContent';
|
||||||
import { AppHeader } from '@/components/app-header';
|
import { AppHeader } from '@/components/AppHeader';
|
||||||
import { AppShell } from '@/components/app-shell';
|
import { AppShell } from '@/components/AppShell';
|
||||||
import { type BreadcrumbItem } from '@/types';
|
import { type BreadcrumbItem } from '@/types';
|
||||||
import type { PropsWithChildren } from 'react';
|
import type { PropsWithChildren } from 'react';
|
||||||
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { AppContent } from '@/components/app-content';
|
import { AppContent } from '@/components/AppContent';
|
||||||
import { AppShell } from '@/components/app-shell';
|
import { AppShell } from '@/components/AppShell';
|
||||||
import { AppSidebar } from '@/components/app-sidebar';
|
import { AppSidebar } from '@/components/AppSidebar';
|
||||||
import { AppSidebarHeader } from '@/components/app-sidebar-header';
|
import { AppSidebarHeader } from '@/components/AppSidebarHeader';
|
||||||
import { type BreadcrumbItem } from '@/types';
|
import { type BreadcrumbItem } from '@/types';
|
||||||
import { type PropsWithChildren } from 'react';
|
import { type PropsWithChildren } from 'react';
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import AppLogoIcon from '@/components/app-logo-icon';
|
import AppLogoIcon from '@/components/AppLogoIcon';
|
||||||
import {
|
import {
|
||||||
Card,
|
Card,
|
||||||
CardContent,
|
CardContent,
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import AppLogoIcon from '@/components/app-logo-icon';
|
import AppLogoIcon from '@/components/AppLogoIcon';
|
||||||
import { home } from '@/routes';
|
import { dashboard } from '@/routes';
|
||||||
import { Link } from '@inertiajs/react';
|
import { Link } from '@inertiajs/react';
|
||||||
import { type PropsWithChildren } from 'react';
|
import { type PropsWithChildren } from 'react';
|
||||||
|
|
||||||
|
|
@ -20,7 +20,7 @@ export default function AuthSimpleLayout({
|
||||||
<div className="flex flex-col gap-8">
|
<div className="flex flex-col gap-8">
|
||||||
<div className="flex flex-col items-center gap-4">
|
<div className="flex flex-col items-center gap-4">
|
||||||
<Link
|
<Link
|
||||||
href={home()}
|
href={dashboard.url()}
|
||||||
className="flex flex-col items-center gap-2 font-medium"
|
className="flex flex-col items-center gap-2 font-medium"
|
||||||
>
|
>
|
||||||
<div className="mb-1 flex h-9 w-9 items-center justify-center rounded-md">
|
<div className="mb-1 flex h-9 w-9 items-center justify-center rounded-md">
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import AppLogoIcon from '@/components/app-logo-icon';
|
import AppLogoIcon from '@/components/AppLogoIcon';
|
||||||
import { home } from '@/routes';
|
import { home } from '@/routes';
|
||||||
import { type SharedData } from '@/types';
|
import { type SharedData } from '@/types';
|
||||||
import { Link, usePage } from '@inertiajs/react';
|
import { Link, usePage } from '@inertiajs/react';
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import Heading from '@/components/heading';
|
import Heading from '@/components/Heading';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Separator } from '@/components/ui/separator';
|
import { Separator } from '@/components/ui/separator';
|
||||||
import { cn, isSameUrl, resolveUrl } from '@/lib/utils';
|
import { cn, isSameUrl, resolveUrl } from '@/lib/utils';
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,9 @@ interface Scenario {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
scenarios: Scenario[];
|
scenarios: {
|
||||||
|
data: Scenario[];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Index({ scenarios }: Props) {
|
export default function Index({ scenarios }: Props) {
|
||||||
|
|
@ -108,7 +110,7 @@ export default function Index({ scenarios }: Props) {
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Scenarios List */}
|
{/* Scenarios List */}
|
||||||
{scenarios.length === 0 ? (
|
{scenarios.data.length === 0 ? (
|
||||||
<div className="rounded-lg bg-white p-12 text-center shadow">
|
<div className="rounded-lg bg-white p-12 text-center shadow">
|
||||||
<div className="mx-auto h-12 w-12 text-gray-400">
|
<div className="mx-auto h-12 w-12 text-gray-400">
|
||||||
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
|
@ -122,7 +124,7 @@ export default function Index({ scenarios }: Props) {
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
<div className="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
||||||
{scenarios.map((scenario) => (
|
{scenarios.data.map((scenario) => (
|
||||||
<div
|
<div
|
||||||
key={scenario.id}
|
key={scenario.id}
|
||||||
onClick={() => router.visit(`/scenarios/${scenario.id}`)}
|
onClick={() => router.visit(`/scenarios/${scenario.id}`)}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import InputError from '@/components/input-error';
|
import InputError from '@/components/InputError';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
import { Spinner } from '@/components/ui/spinner';
|
import { Spinner } from '@/components/ui/spinner';
|
||||||
import AuthLayout from '@/layouts/auth-layout';
|
import AuthLayout from '@/layouts/AuthLayout';
|
||||||
import { store } from '@/routes/password/confirm';
|
import { store } from '@/routes/password/confirm';
|
||||||
import { Form, Head } from '@inertiajs/react';
|
import { Form, Head } from '@inertiajs/react';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,12 @@ import { email } from '@/routes/password';
|
||||||
import { Form, Head } from '@inertiajs/react';
|
import { Form, Head } from '@inertiajs/react';
|
||||||
import { LoaderCircle } from 'lucide-react';
|
import { LoaderCircle } from 'lucide-react';
|
||||||
|
|
||||||
import InputError from '@/components/input-error';
|
import InputError from '@/components/InputError';
|
||||||
import TextLink from '@/components/text-link';
|
import TextLink from '@/components/TextLink';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
import AuthLayout from '@/layouts/auth-layout';
|
import AuthLayout from '@/layouts/AuthLayout';
|
||||||
|
|
||||||
export default function ForgotPassword({ status }: { status?: string }) {
|
export default function ForgotPassword({ status }: { status?: string }) {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
import InputError from '@/components/input-error';
|
import InputError from '@/components/InputError';
|
||||||
import TextLink from '@/components/text-link';
|
import TextLink from '@/components/TextLink';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Checkbox } from '@/components/ui/checkbox';
|
import { Checkbox } from '@/components/ui/checkbox';
|
||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
import { Spinner } from '@/components/ui/spinner';
|
import { Spinner } from '@/components/ui/spinner';
|
||||||
import AuthLayout from '@/layouts/auth-layout';
|
import AuthLayout from '@/layouts/AuthLayout';
|
||||||
import { register } from '@/routes';
|
import { register } from '@/routes';
|
||||||
import { store } from '@/routes/login';
|
import { store } from '@/routes/login';
|
||||||
import { request } from '@/routes/password';
|
import { request } from '@/routes/password';
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,13 @@ import { login } from '@/routes';
|
||||||
import { store } from '@/routes/register';
|
import { store } from '@/routes/register';
|
||||||
import { Form, Head } from '@inertiajs/react';
|
import { Form, Head } from '@inertiajs/react';
|
||||||
|
|
||||||
import InputError from '@/components/input-error';
|
import InputError from '@/components/InputError';
|
||||||
import TextLink from '@/components/text-link';
|
import TextLink from '@/components/TextLink';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
import { Spinner } from '@/components/ui/spinner';
|
import { Spinner } from '@/components/ui/spinner';
|
||||||
import AuthLayout from '@/layouts/auth-layout';
|
import AuthLayout from '@/layouts/AuthLayout';
|
||||||
|
|
||||||
export default function Register() {
|
export default function Register() {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
import { update } from '@/routes/password';
|
import { update } from '@/routes/password';
|
||||||
import { Form, Head } from '@inertiajs/react';
|
import { Form, Head } from '@inertiajs/react';
|
||||||
|
|
||||||
import InputError from '@/components/input-error';
|
import InputError from '@/components/InputError';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
import { Spinner } from '@/components/ui/spinner';
|
import { Spinner } from '@/components/ui/spinner';
|
||||||
import AuthLayout from '@/layouts/auth-layout';
|
import AuthLayout from '@/layouts/AuthLayout';
|
||||||
|
|
||||||
interface ResetPasswordProps {
|
interface ResetPasswordProps {
|
||||||
token: string;
|
token: string;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import InputError from '@/components/input-error';
|
import InputError from '@/components/InputError';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import {
|
import {
|
||||||
|
|
@ -7,7 +7,7 @@ import {
|
||||||
InputOTPSlot,
|
InputOTPSlot,
|
||||||
} from '@/components/ui/input-otp';
|
} from '@/components/ui/input-otp';
|
||||||
import { OTP_MAX_LENGTH } from '@/hooks/use-two-factor-auth';
|
import { OTP_MAX_LENGTH } from '@/hooks/use-two-factor-auth';
|
||||||
import AuthLayout from '@/layouts/auth-layout';
|
import AuthLayout from '@/layouts/AuthLayout';
|
||||||
import { store } from '@/routes/two-factor/login';
|
import { store } from '@/routes/two-factor/login';
|
||||||
import { Form, Head } from '@inertiajs/react';
|
import { Form, Head } from '@inertiajs/react';
|
||||||
import { REGEXP_ONLY_DIGITS } from 'input-otp';
|
import { REGEXP_ONLY_DIGITS } from 'input-otp';
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
// Components
|
// Components
|
||||||
import TextLink from '@/components/text-link';
|
import TextLink from '@/components/TextLink';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Spinner } from '@/components/ui/spinner';
|
import { Spinner } from '@/components/ui/spinner';
|
||||||
import AuthLayout from '@/layouts/auth-layout';
|
import AuthLayout from '@/layouts/AuthLayout';
|
||||||
import { logout } from '@/routes';
|
import { logout } from '@/routes';
|
||||||
import { send } from '@/routes/verification';
|
import { send } from '@/routes/verification';
|
||||||
import { Form, Head } from '@inertiajs/react';
|
import { Form, Head } from '@inertiajs/react';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { PlaceholderPattern } from '@/components/ui/placeholder-pattern';
|
import { PlaceholderPattern } from '@/components/ui/placeholder-pattern';
|
||||||
import AppLayout from '@/layouts/app-layout';
|
import AppLayout from '@/layouts/AppLayout';
|
||||||
import { dashboard } from '@/routes';
|
import { dashboard } from '@/routes';
|
||||||
import { type BreadcrumbItem } from '@/types';
|
import { type BreadcrumbItem } from '@/types';
|
||||||
import { Head } from '@inertiajs/react';
|
import { Head } from '@inertiajs/react';
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import { Head } from '@inertiajs/react';
|
import { Head } from '@inertiajs/react';
|
||||||
|
|
||||||
import AppearanceTabs from '@/components/appearance-tabs';
|
import AppearanceTabs from '@/components/AppearanceTabs';
|
||||||
import HeadingSmall from '@/components/heading-small';
|
import HeadingSmall from '@/components/HeadingSmall';
|
||||||
import { type BreadcrumbItem } from '@/types';
|
import { type BreadcrumbItem } from '@/types';
|
||||||
|
|
||||||
import AppLayout from '@/layouts/app-layout';
|
import AppLayout from '@/layouts/AppLayout';
|
||||||
import SettingsLayout from '@/layouts/settings/layout';
|
import SettingsLayout from '@/layouts/settings/layout';
|
||||||
import { edit as editAppearance } from '@/routes/appearance';
|
import { edit as editAppearance } from '@/routes/appearance';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
import PasswordController from '@/actions/App/Http/Controllers/Settings/PasswordController';
|
import PasswordController from '@/actions/App/Http/Controllers/Settings/PasswordController';
|
||||||
import InputError from '@/components/input-error';
|
import InputError from '@/components/InputError';
|
||||||
import AppLayout from '@/layouts/app-layout';
|
import AppLayout from '@/layouts/AppLayout';
|
||||||
import SettingsLayout from '@/layouts/settings/layout';
|
import SettingsLayout from '@/layouts/settings/layout';
|
||||||
import { type BreadcrumbItem } from '@/types';
|
import { type BreadcrumbItem } from '@/types';
|
||||||
import { Transition } from '@headlessui/react';
|
import { Transition } from '@headlessui/react';
|
||||||
import { Form, Head } from '@inertiajs/react';
|
import { Form, Head } from '@inertiajs/react';
|
||||||
import { useRef } from 'react';
|
import { useRef } from 'react';
|
||||||
|
|
||||||
import HeadingSmall from '@/components/heading-small';
|
import HeadingSmall from '@/components/HeadingSmall';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,13 @@ import { type BreadcrumbItem, type SharedData } from '@/types';
|
||||||
import { Transition } from '@headlessui/react';
|
import { Transition } from '@headlessui/react';
|
||||||
import { Form, Head, Link, usePage } from '@inertiajs/react';
|
import { Form, Head, Link, usePage } from '@inertiajs/react';
|
||||||
|
|
||||||
import DeleteUser from '@/components/delete-user';
|
import DeleteUser from '@/components/DeleteUser';
|
||||||
import HeadingSmall from '@/components/heading-small';
|
import HeadingSmall from '@/components/HeadingSmall';
|
||||||
import InputError from '@/components/input-error';
|
import InputError from '@/components/InputError';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
import AppLayout from '@/layouts/app-layout';
|
import AppLayout from '@/layouts/AppLayout';
|
||||||
import SettingsLayout from '@/layouts/settings/layout';
|
import SettingsLayout from '@/layouts/settings/layout';
|
||||||
import { edit } from '@/routes/profile';
|
import { edit } from '@/routes/profile';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import HeadingSmall from '@/components/heading-small';
|
import HeadingSmall from '@/components/HeadingSmall';
|
||||||
import TwoFactorRecoveryCodes from '@/components/two-factor-recovery-codes';
|
import TwoFactorRecoveryCodes from '@/components/TwoFactorRecoveryCodes';
|
||||||
import TwoFactorSetupModal from '@/components/two-factor-setup-modal';
|
import TwoFactorSetupModal from '@/components/TwoFactorSetupModal';
|
||||||
import { Badge } from '@/components/ui/badge';
|
import { Badge } from '@/components/ui/badge';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { useTwoFactorAuth } from '@/hooks/use-two-factor-auth';
|
import { useTwoFactorAuth } from '@/hooks/use-two-factor-auth';
|
||||||
import AppLayout from '@/layouts/app-layout';
|
import AppLayout from '@/layouts/AppLayout';
|
||||||
import SettingsLayout from '@/layouts/settings/layout';
|
import SettingsLayout from '@/layouts/settings/layout';
|
||||||
import { disable, enable, show } from '@/routes/two-factor';
|
import { disable, enable, show } from '@/routes/two-factor';
|
||||||
import { type BreadcrumbItem } from '@/types';
|
import { type BreadcrumbItem } from '@/types';
|
||||||
|
|
|
||||||
1
resources/js/test-debug.js
Normal file
1
resources/js/test-debug.js
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
console.log("TEST: App loading", window.location.href);
|
||||||
Loading…
Reference in a new issue