AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

app.tsx 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import { createInertiaApp } from '@inertiajs/react';
  2. import { Toaster } from '@/components/ui/sonner';
  3. import { TooltipProvider } from '@/components/ui/tooltip';
  4. import { initializeTheme } from '@/hooks/use-appearance';
  5. import AppLayout from '@/layouts/app-layout';
  6. import AuthLayout from '@/layouts/auth-layout';
  7. import SettingsLayout from '@/layouts/settings/layout';
  8. import { storefrontTitlePrefix } from '@/storefront/theme';
  9. const appName = import.meta.env.VITE_APP_NAME || 'Laravel';
  10. void createInertiaApp({
  11. title: (title) => {
  12. // A store's own pages show the store's name only, never ours.
  13. if (title.startsWith(storefrontTitlePrefix)) {
  14. return title.slice(storefrontTitlePrefix.length);
  15. }
  16. return title ? `${title} - ${appName}` : appName;
  17. },
  18. layout: (name) => {
  19. switch (true) {
  20. case name === 'welcome':
  21. case name === 'stores/preview':
  22. // Full pages with no dashboard around them.
  23. return null;
  24. case name.startsWith('auth/'):
  25. return AuthLayout;
  26. case name.startsWith('settings/'):
  27. return [AppLayout, SettingsLayout];
  28. default:
  29. return AppLayout;
  30. }
  31. },
  32. strictMode: true,
  33. withApp(app) {
  34. return (
  35. <TooltipProvider delayDuration={0}>
  36. {app}
  37. <Toaster />
  38. </TooltipProvider>
  39. );
  40. },
  41. progress: {
  42. color: '#4B5563',
  43. },
  44. });
  45. // This will set light / dark mode on load...
  46. initializeTheme();