-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #110 from justdlabs/laravel-11.x
Laravel 11.x
- Loading branch information
Showing
70 changed files
with
1,052 additions
and
1,042 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,5 +80,5 @@ | |
} | ||
} | ||
}, | ||
"version": "1.0.28" | ||
"version": "1.0.29" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ export default { | |
tailwindcss: {}, | ||
autoprefixer: {} | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
import '../css/app.css' | ||
import './bootstrap' | ||
import '../css/app.css'; | ||
import './bootstrap'; | ||
|
||
import { Ziggy } from '@/ziggy' | ||
import { createInertiaApp } from '@inertiajs/react' | ||
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers' | ||
import { createRoot, hydrateRoot } from 'react-dom/client' | ||
import { useRoute } from 'ziggy-js' | ||
import { Providers } from './providers' | ||
import { Ziggy } from '@/ziggy'; | ||
import { createInertiaApp } from '@inertiajs/react'; | ||
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers'; | ||
import { createRoot, hydrateRoot } from 'react-dom/client'; | ||
import { useRoute } from 'ziggy-js'; | ||
import { Providers } from './providers'; | ||
|
||
const appName = import.meta.env.VITE_APP_NAME || 'Laravel' | ||
const appName = import.meta.env.VITE_APP_NAME || 'Laravel'; | ||
|
||
createInertiaApp({ | ||
title: (title) => (title ? `${title} / ${appName}` : appName), | ||
resolve: (name) => resolvePageComponent(`./pages/${name}.tsx`, import.meta.glob('./pages/**/*.tsx')), | ||
setup({ el, App, props }) { | ||
window.route = useRoute(Ziggy as any) | ||
window.route = useRoute(Ziggy as any); | ||
const appElement = ( | ||
<Providers> | ||
<App {...props} /> | ||
</Providers> | ||
) | ||
); | ||
if (import.meta.env.DEV) { | ||
createRoot(el).render(appElement) | ||
return | ||
createRoot(el).render(appElement); | ||
return; | ||
} | ||
|
||
hydrateRoot(el, appElement) | ||
hydrateRoot(el, appElement); | ||
}, | ||
progress: { | ||
color: '#4B5563' | ||
} | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import axios from 'axios' | ||
import axios from 'axios'; | ||
|
||
window.axios = axios | ||
window.axios = axios; | ||
|
||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest' | ||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import React from 'react' | ||
import React from 'react'; | ||
|
||
import { cn } from 'ui' | ||
import { cn } from 'ui'; | ||
|
||
const Container = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>( | ||
({ className, ...props }, ref) => ( | ||
<div className={cn('mx-auto max-w-7xl px-4 sm:px-6 lg:px-8', className)} {...props} ref={ref} /> | ||
) | ||
) | ||
Container.displayName = 'Container' | ||
); | ||
Container.displayName = 'Container'; | ||
|
||
export { Container } | ||
export { Container }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import { FlashMessageData } from '@/types/index' | ||
import { usePage } from '@inertiajs/react' | ||
import { useEffect } from 'react' | ||
import { toast } from 'sonner' | ||
import { Toast } from 'ui' | ||
import { FlashMessageData } from '@/types/index'; | ||
import { usePage } from '@inertiajs/react'; | ||
import { useEffect } from 'react'; | ||
import { toast } from 'sonner'; | ||
import { Toast } from 'ui'; | ||
|
||
export function FlashMessage() { | ||
const { flash_message } = usePage<{ flash_message: FlashMessageData }>().props | ||
const { flash_message } = usePage<{ flash_message: FlashMessageData }>().props; | ||
useEffect(() => { | ||
if (flash_message && flash_message.message) { | ||
;(toast as any)[flash_message.type](flash_message.message) | ||
(toast as any)[flash_message.type](flash_message.message); | ||
} | ||
}, [flash_message]) | ||
return <Toast /> | ||
}, [flash_message]); | ||
return <Toast />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { IconBrandLaravel } from 'justd-icons' | ||
import React from 'react' | ||
import { cn } from 'ui' | ||
import { IconBrandLaravel } from 'justd-icons'; | ||
import React from 'react'; | ||
import { cn } from 'ui'; | ||
|
||
export function Logo({ className, ...props }: React.SVGProps<SVGSVGElement>) { | ||
return <IconBrandLaravel className={cn('size-6', className)} {...props} /> | ||
return <IconBrandLaravel className={cn('size-6', className)} {...props} />; | ||
} |
Oops, something went wrong.