diff --git a/web/app/actions.ts b/web/app/actions.ts
index b62ad0fd..c927aff0 100644
--- a/web/app/actions.ts
+++ b/web/app/actions.ts
@@ -2,7 +2,7 @@
import axios from "axios";
import { formatCurrency } from "@/utils/yachts";
-import { Featured } from "@/models/yachts";
+import { Yacht } from "@/models/yacht";
import { Customer } from "@/models/customer";
import { Newsletter } from "@/models/newsletter";
@@ -73,7 +73,7 @@ export const contact = async (formData: FormData) => {
};
export const fetchFeatured = async () => {
- return await Featured.find({ featured: true })
+ return await Yacht.find({ featured: true })
.select("name price builder length yearBuilt sleeps")
.catch((e) => {
throw e;
diff --git a/web/app/store.ts b/web/app/store.ts
new file mode 100644
index 00000000..a57a8cac
--- /dev/null
+++ b/web/app/store.ts
@@ -0,0 +1,14 @@
+import { create } from "zustand";
+import { IView, IViewActions } from "@/types/view";
+import { currency } from "@/utils/yachts";
+import Cookies from "js-cookie";
+
+export const useView = create()((set) => ({
+ currency: currency(),
+ view: null,
+ setCurrency: (code) => {
+ Cookies.set("currency", code);
+ set({ currency: code });
+ },
+ openView: (view) => set({ view }),
+}));
diff --git a/web/components/footer/components.tsx b/web/components/footer.tsx
similarity index 89%
rename from web/components/footer/components.tsx
rename to web/components/footer.tsx
index 6d7ff95d..9b1ff3c2 100644
--- a/web/components/footer/components.tsx
+++ b/web/components/footer.tsx
@@ -1,12 +1,14 @@
+"use client";
+
import Logo from "@/public/logo/logo";
import SocialLinks from "@/components/nav/social";
import { Link } from "@/navigation";
import { useTranslations } from "next-intl";
-import { useInteraction } from "@/contexts/interact";
+import { useView } from "@/app/store";
-const Components = () => {
+const Footer = () => {
const t = useTranslations(),
- { openUI } = useInteraction();
+ { openView } = useView();
return (
-
-
- {carouselData.map((card, i) => (
-
- ))}
-
-
- {carouselExtended.map((card, i) => (
-
- ))}
-
-
+
+ {carouselData.map((card, i) => (
+
+ ))}
+
+
+ {carouselExtended.map((card, i) => (
+
+ ))}
+
);
};
diff --git a/web/components/nav/bar.tsx b/web/components/nav/bar.tsx
new file mode 100644
index 00000000..a08e3e37
--- /dev/null
+++ b/web/components/nav/bar.tsx
@@ -0,0 +1,79 @@
+"use client";
+
+import View from "@/components/nav/view";
+import Logo from "@/public/logo/logo";
+import { useTranslations } from "next-intl";
+import { useEffect, useState } from "react";
+import { useView } from "@/app/store";
+
+const Bar = ({ dynamicColor }: { dynamicColor: number }) => {
+ const t = useTranslations("bar"),
+ { openView } = useView(),
+ [isScrolled, setScrolled] = useState