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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 === 'home':
  21. case name.startsWith('legal/'):
  22. case name === 'stores/preview':
  23. // Full pages with no dashboard around them.
  24. return null;
  25. case name.startsWith('auth/'):
  26. return AuthLayout;
  27. case name.startsWith('settings/'):
  28. return [AppLayout, SettingsLayout];
  29. default:
  30. return AppLayout;
  31. }
  32. },
  33. strictMode: true,
  34. withApp(app) {
  35. return (
  36. <TooltipProvider delayDuration={0}>
  37. {app}
  38. <Toaster />
  39. </TooltipProvider>
  40. );
  41. },
  42. progress: {
  43. color: '#4B5563',
  44. },
  45. });
  46. // This will set light / dark mode on load...
  47. initializeTheme();