diff --git a/resources/js/Layouts/Footer.tsx b/resources/js/Layouts/Footer.tsx
new file mode 100644
index 0000000..46305a8
--- /dev/null
+++ b/resources/js/Layouts/Footer.tsx
@@ -0,0 +1,89 @@
+import ApplicationLogo from "@/Components/ApplicationLogo";
+import Typography from "@/Components/Typography";
+import { Link } from "@inertiajs/react";
+import { Instagram } from "lucide-react";
+import { Twitter } from "lucide-react";
+import { Facebook } from "lucide-react";
+
+export default function Footer() {
+ return (
+
+
+
+ {/* Quick Links */}
+
+
+ Quick Links
+
+
+
+
+ Home
+
+
+
+
+
+
+ Product
+
+
+
+
+
+
+ Login
+
+
+
+
+
+
+ Register
+
+
+
+
+ {/* Our Contact */}
+
+
+ Our Contact
+
+
+
+
+ Instagram
+
+
+
+
+
+ Twitter
+
+
+
+
+
+ Facebook
+
+
+
+
+
+
+ © Copyright Furnixy! 2024. All Rights Reserved
+
+
+ );
+}
diff --git a/resources/js/Layouts/Layout.tsx b/resources/js/Layouts/Layout.tsx
new file mode 100644
index 0000000..526b0fc
--- /dev/null
+++ b/resources/js/Layouts/Layout.tsx
@@ -0,0 +1,13 @@
+import { type PropsWithChildren } from "react";
+import Footer from "./Footer";
+import Navbar from "./Navbar";
+
+export default function Layout({ children }: PropsWithChildren) {
+ return (
+
+
+ {children}
+
+
+ );
+}
diff --git a/resources/js/Layouts/Navbar.tsx b/resources/js/Layouts/Navbar.tsx
new file mode 100644
index 0000000..ee468ab
--- /dev/null
+++ b/resources/js/Layouts/Navbar.tsx
@@ -0,0 +1,187 @@
+import ApplicationLogo from "@/Components/ApplicationLogo";
+import Dropdown from "@/Components/Dropdown";
+import NavLink from "@/Components/NavLink";
+import ResponsiveNavLink from "@/Components/ResponsiveNavLink";
+import { Link, usePage } from "@inertiajs/react";
+import { useState } from "react";
+
+export default function Navbar() {
+ const { auth } = usePage().props as unknown as {
+ auth: {
+ user: {
+ name: string;
+ email: string;
+ role: string;
+ };
+ };
+ };
+
+ const [showingNavigationDropdown, setShowingNavigationDropdown] =
+ useState(false);
+
+ return (
+
+
+
+
+
+
+
+
+ Product
+
+ {auth.user !== null && auth.user.role === "user" && (
+
+ Cart
+
+ )}
+
+
+
+ {auth.user !== null ? (
+
+
+
+
+
+
+ {auth.user.name}
+
+
+
+
+
+
+
+
+
+
+ Profile
+
+
+ Log Out
+
+
+
+
+
+ ) : (
+
+ Login
+ Register
+
+ )}
+
+
+
+ setShowingNavigationDropdown((previousState) => !previousState)
+ }
+ className="inline-flex items-center justify-center rounded-md p-2 text-gray-400 transition duration-150 ease-in-out hover:bg-gray-100 hover:text-gray-500 focus:bg-gray-100 focus:text-gray-500 focus:outline-none"
+ >
+
+
+
+
+
+
+
+
+
+
+ {auth.user !== null && (
+
+
+ Dashboard
+
+
+ )}
+
+ {auth.user !== null ? (
+
+
+
+ {auth.user.name}
+
+
+ {auth.user.name}
+
+
+
+
+
+ Profile
+
+
+ Log Out
+
+
+
+ ) : (
+
+ Login
+ Register
+
+ )}
+
+
+ );
+}
diff --git a/resources/js/Pages/Welcome.tsx b/resources/js/Pages/Welcome.tsx
index 9e38cd5..f0ff917 100644
--- a/resources/js/Pages/Welcome.tsx
+++ b/resources/js/Pages/Welcome.tsx
@@ -1,352 +1,137 @@
-import type { PageProps } from "@/types";
-import { Head, Link } from "@inertiajs/react";
-
-export default function Welcome({
- auth,
- laravelVersion,
- phpVersion,
-}: PageProps<{ laravelVersion: string; phpVersion: string }>) {
- const handleImageError = () => {
- document.getElementById("screenshot-container")?.classList.add("!hidden");
- document.getElementById("docs-card")?.classList.add("!row-span-1");
- document.getElementById("docs-card-content")?.classList.add("!flex-row");
- document.getElementById("background")?.classList.add("!hidden");
- };
+import ButtonLink from "@/Components/ButtonLink";
+import Typography from "@/Components/Typography";
+import Layout from "@/Layouts/Layout";
+import { Head } from "@inertiajs/react";
+export default function Welcome() {
return (
- <>
+
-
-
-
-
-
-
-
- {auth.user ? (
-
- Dashboard
-
- ) : (
- <>
-
- Log in
-
-
- Register
-
- >
- )}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Documentation
-
-
-
- Laravel has wonderful documentation covering every
- aspect of the framework. Whether you are a newcomer or
- have prior experience with Laravel, we recommend
- reading our documentation from beginning to end.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Laracasts
-
-
-
- Laracasts offers thousands of video tutorials on Laravel,
- PHP, and JavaScript development. Check them out, see for
- yourself, and massively level up your development skills
- in the process.
-
-
-
-
-
-
-
-
-
-
-
-
-
- Laravel News
-
-
-
- Laravel News is a community driven portal and newsletter
- aggregating all of the latest and most important news in
- the Laravel ecosystem, including new package releases and
- tutorials.
-
-
-
-
-
-
-
+
+
+
+ FURNIXY
+
+
+ Elevate Your Space,{" "}
+ Redefine Your Comfort
+
+
+ Check Our Products
+
+
+
-
-
+
+
+
+
+
-
-
- Vibrant Ecosystem
-
+
+ {/* 1 */}
+
+
+
+
+
+
+ Modern Designs
+
+
+ Redefine your style with contemporary elegance.
+
+
+
+ {/* 2 */}
+
+
+
+ Top-Quality Craftsmanship
+
+ Experience perfection in every detail.
+
+
+
+
+
+ {/* 3 */}
+
+
+
+
+
+
+ Free Shipping & Easy Returns
+
+
+ Shop with confidence, we’ve got you covered.
+
+
+
+
-
- Laravel's robust library of first-party tools and
- libraries, such as{" "}
-
- Forge
-
- ,{" "}
-
- Vapor
-
- ,{" "}
-
- Nova
-
- ,{" "}
-
- Envoyer
-
- , and{" "}
-
- Herd
- {" "}
- help you take your projects to the next level. Pair them
- with powerful open source libraries like{" "}
-
- Cashier
-
- ,{" "}
-
- Dusk
-
- ,{" "}
-
- Echo
-
- ,{" "}
-
- Horizon
-
- ,{" "}
-
- Sanctum
-
- ,{" "}
-
- Telescope
-
- , and more.
-
-
-
-
-
+
+
+
+
+
-
- Laravel v{laravelVersion} (PHP v{phpVersion})
-
+
+
+
+ What Our Customer Says
+
+
+
+
+
+ "The quality of the furniture is outstanding! My living room has
+ never looked better. The delivery was smooth, and the assembly was
+ so easy. Highly recommend this store!"
+
+ - Emily J.
+
+
+
+
+ "I love my new dining table set! It’s sturdy, elegant, and fits
+ perfectly in my home. The customer service team was super
+ helpful with my queries."
+
+ - James T.
+
+
+
+
+
+ "Affordable prices, premium quality, and excellent designs. The
+ minimalist chair I bought exceeded my expectations. Will
+ definitely shop here again!"
+
+ - Shopia L.
+
-
- >
+
+
);
}
diff --git a/routes/web.php b/routes/web.php
index a28fa28..1b50b57 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -6,17 +6,33 @@
use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Route;
use Inertia\Inertia;
+use Illuminate\Support\Facades\Auth;
Route::get('/dashboard', function () {
return Inertia::render('Dashboard');
})->middleware(['auth', 'verified'])->name('dashboard');
+Route::get('/', function () {
+ $user = Auth::user();
+ return Inertia::render('Welcome', [
+ 'auth' => [
+ 'user' => $user ? [
+ 'id' => $user->id,
+ 'name' => $user->name,
+ 'email' => $user->email,
+ 'role' => $user->role,
+ ] : null,
+ ],
+ ]);
+});
+
+
Route::middleware('auth')->group(function () {
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
-
- Route::prefix('/')->group(function () {
+
+ Route::prefix('/product')->group(function () {
Route::get('/', [ProductController::class, 'index'])->name('product.index');
Route::get('/{product}/detail', [ProductController::class, 'show'])->name('product.show');
});