design upgrade
This commit is contained in:
@@ -7,7 +7,7 @@ import { Metadata } from "next"
|
||||
import { notFound } from "next/navigation"
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Checkout",
|
||||
title: "Plaćanje",
|
||||
}
|
||||
|
||||
export default async function Checkout() {
|
||||
@@ -20,7 +20,7 @@ export default async function Checkout() {
|
||||
const customer = await retrieveCustomer()
|
||||
|
||||
return (
|
||||
<div className="grid grid-cols-1 small:grid-cols-[1fr_416px] content-container gap-x-40 py-12">
|
||||
<div className="content-container grid grid-cols-1 gap-x-16 xl:gap-x-24 py-10 sm:py-14 lg:grid-cols-[1fr_420px]">
|
||||
<PaymentWrapper cart={cart}>
|
||||
<CheckoutForm cart={cart} customer={customer} />
|
||||
</PaymentWrapper>
|
||||
|
||||
@@ -1,42 +1,44 @@
|
||||
import LocalizedClientLink from "@modules/common/components/localized-client-link"
|
||||
import ChevronDown from "@modules/common/icons/chevron-down"
|
||||
import MedusaCTA from "@modules/layout/components/medusa-cta"
|
||||
import { Logo } from "@/components/ui/logo"
|
||||
import { ArrowLeft, Lock } from "lucide-react"
|
||||
|
||||
/** Focused checkout shell: back to cart, logo, secure-payment note */
|
||||
export default function CheckoutLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
return (
|
||||
<div className="w-full bg-white relative small:min-h-screen">
|
||||
<div className="h-16 bg-white border-b ">
|
||||
<nav className="flex h-full items-center content-container justify-between">
|
||||
<div className="relative w-full bg-background lg:min-h-screen">
|
||||
<div className="sticky top-0 z-50 border-b border-border/70 bg-background">
|
||||
<nav className="content-container grid h-14 grid-cols-[1fr_auto_1fr] items-center sm:h-16">
|
||||
<LocalizedClientLink
|
||||
href="/cart"
|
||||
className="text-small-semi text-ui-fg-base flex items-center gap-x-2 uppercase flex-1 basis-0"
|
||||
className="flex items-center gap-2 justify-self-start text-sm text-muted-foreground transition-colors hover:text-foreground"
|
||||
data-testid="back-to-cart-link"
|
||||
>
|
||||
<ChevronDown className="rotate-90" size={16} />
|
||||
<span className="mt-px hidden small:block txt-compact-plus text-ui-fg-subtle hover:text-ui-fg-base ">
|
||||
Back to shopping cart
|
||||
</span>
|
||||
<span className="mt-px block small:hidden txt-compact-plus text-ui-fg-subtle hover:text-ui-fg-base">
|
||||
Back
|
||||
</span>
|
||||
<ArrowLeft className="h-4 w-4" />
|
||||
<span className="hidden sm:inline">Nazad u korpu</span>
|
||||
<span className="sm:hidden">Nazad</span>
|
||||
</LocalizedClientLink>
|
||||
<LocalizedClientLink
|
||||
href="/"
|
||||
className="txt-compact-xlarge-plus text-ui-fg-subtle hover:text-ui-fg-base uppercase"
|
||||
className="relative w-[56px] self-stretch sm:w-[72px]"
|
||||
data-testid="store-link"
|
||||
aria-label="Suman d.o.o. početna"
|
||||
>
|
||||
Medusa Store
|
||||
<span className="absolute inset-x-0 top-0 block">
|
||||
<Logo priority alt="" />
|
||||
</span>
|
||||
</LocalizedClientLink>
|
||||
<div className="flex-1 basis-0" />
|
||||
<p className="flex items-center gap-1.5 justify-self-end text-xs text-muted-foreground">
|
||||
<Lock className="h-3.5 w-3.5" />
|
||||
<span className="hidden sm:inline">Sigurno plaćanje</span>
|
||||
</p>
|
||||
</nav>
|
||||
</div>
|
||||
<div className="relative" data-testid="checkout-container">{children}</div>
|
||||
<div className="py-4 w-full flex items-center justify-center">
|
||||
<MedusaCTA />
|
||||
<div className="relative" data-testid="checkout-container">
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -3,14 +3,14 @@ import { Metadata } from "next"
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "404",
|
||||
description: "Something went wrong",
|
||||
description: "Stranica nije pronađena.",
|
||||
}
|
||||
|
||||
export default async function NotFound() {
|
||||
return (
|
||||
<div className="flex flex-col gap-4 items-center justify-center min-h-[calc(100vh-64px)]">
|
||||
<h1 className="text-2xl-semi text-ui-fg-base">Page not found</h1>
|
||||
<p className="text-small-regular text-ui-fg-base">
|
||||
<h1 className="font-display text-2xl text-foreground">Page not found</h1>
|
||||
<p className="text-sm text-foreground">
|
||||
The page you tried to access does not exist.
|
||||
</p>
|
||||
<InteractiveLink href="/">Go to frontpage</InteractiveLink>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import SectionHeading from "@modules/account/components/section-heading"
|
||||
import { Metadata } from "next"
|
||||
import { notFound } from "next/navigation"
|
||||
|
||||
@@ -8,7 +9,7 @@ import { retrieveCustomer } from "@lib/data/customer"
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Addresses",
|
||||
description: "View your addresses",
|
||||
description: "Pregled vaših adresa.",
|
||||
}
|
||||
|
||||
export default async function Addresses(props: {
|
||||
@@ -25,13 +26,10 @@ export default async function Addresses(props: {
|
||||
|
||||
return (
|
||||
<div className="w-full" data-testid="addresses-page-wrapper">
|
||||
<div className="mb-8 flex flex-col gap-y-4">
|
||||
<h1 className="text-2xl-semi">Shipping Addresses</h1>
|
||||
<p className="text-base-regular">
|
||||
View and update your shipping addresses, you can add as many as you
|
||||
like. Saving your addresses will make them available during checkout.
|
||||
</p>
|
||||
</div>
|
||||
<SectionHeading
|
||||
title="Adrese za dostavu"
|
||||
description="Sačuvane adrese nude se automatski pri plaćanju, pa naručujete brže."
|
||||
/>
|
||||
<AddressBook customer={customer} region={region} />
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -2,7 +2,7 @@ import Spinner from "@modules/common/icons/spinner"
|
||||
|
||||
export default function Loading() {
|
||||
return (
|
||||
<div className="flex items-center justify-center w-full h-full text-ui-fg-base">
|
||||
<div className="flex items-center justify-center w-full h-full text-foreground">
|
||||
<Spinner size={36} />
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import SectionHeading from "@modules/account/components/section-heading"
|
||||
import { Metadata } from "next"
|
||||
|
||||
import OrderOverview from "@modules/account/components/order-overview"
|
||||
import { notFound } from "next/navigation"
|
||||
import { listOrders } from "@lib/data/orders"
|
||||
import Divider from "@modules/common/components/divider"
|
||||
import TransferRequestForm from "@modules/account/components/transfer-request-form"
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Orders",
|
||||
description: "Overview of your previous orders.",
|
||||
title: "Narudžbe",
|
||||
description: "Pregled vaših prethodnih narudžbi.",
|
||||
}
|
||||
|
||||
export default async function Orders() {
|
||||
@@ -20,16 +20,12 @@ export default async function Orders() {
|
||||
|
||||
return (
|
||||
<div className="w-full" data-testid="orders-page-wrapper">
|
||||
<div className="mb-8 flex flex-col gap-y-4">
|
||||
<h1 className="text-2xl-semi">Orders</h1>
|
||||
<p className="text-base-regular">
|
||||
View your previous orders and their status. You can also create
|
||||
returns or exchanges for your orders if needed.
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<OrderOverview orders={orders} />
|
||||
<Divider className="mb-8 mt-8" />
|
||||
<SectionHeading
|
||||
title="Narudžbe"
|
||||
description="Pregled vaših narudžbi, statusa i isporuka."
|
||||
/>
|
||||
<OrderOverview orders={orders} />
|
||||
<div className="mt-14 rounded-2xl bg-muted p-6 sm:p-8">
|
||||
<TransferRequestForm />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,8 +6,8 @@ import { retrieveCustomer } from "@lib/data/customer"
|
||||
import { listOrders } from "@lib/data/orders"
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Account",
|
||||
description: "Overview of your account activity.",
|
||||
title: "Moj račun",
|
||||
description: "Pregled aktivnosti na vašem računu.",
|
||||
}
|
||||
|
||||
export default async function OverviewTemplate() {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import SectionHeading from "@modules/account/components/section-heading"
|
||||
import { Metadata } from "next"
|
||||
|
||||
import ProfilePhone from "@modules/account//components/profile-phone"
|
||||
@@ -10,7 +11,7 @@ import { retrieveCustomer } from "@lib/data/customer"
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Profile",
|
||||
description: "View and edit your Medusa Store profile.",
|
||||
description: "Pregled i izmjena vašeg profila.",
|
||||
}
|
||||
|
||||
export default async function Profile() {
|
||||
@@ -23,29 +24,19 @@ export default async function Profile() {
|
||||
|
||||
return (
|
||||
<div className="w-full" data-testid="profile-page-wrapper">
|
||||
<div className="mb-8 flex flex-col gap-y-4">
|
||||
<h1 className="text-2xl-semi">Profile</h1>
|
||||
<p className="text-base-regular">
|
||||
View and update your profile information, including your name, email,
|
||||
and phone number. You can also update your billing address, or change
|
||||
your password.
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex flex-col gap-y-8 w-full">
|
||||
<SectionHeading
|
||||
title="Profil"
|
||||
description="Ime, email, telefon i adresa za račun koje koristimo za vaše narudžbe."
|
||||
/>
|
||||
<div className="flex w-full flex-col divide-y divide-border/70 border-y border-border/70">
|
||||
<ProfileName customer={customer} />
|
||||
<Divider />
|
||||
<ProfileEmail customer={customer} />
|
||||
<Divider />
|
||||
<ProfilePhone customer={customer} />
|
||||
<Divider />
|
||||
{/* <ProfilePassword customer={customer} />
|
||||
<Divider /> */}
|
||||
{/* <ProfilePassword customer={customer} /> */}
|
||||
<ProfileBillingAddress customer={customer} regions={regions} />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const Divider = () => {
|
||||
return <div className="w-full h-px bg-gray-200" />
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ import { Metadata } from "next"
|
||||
import LoginTemplate from "@modules/account/templates/login-template"
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Sign in",
|
||||
description: "Sign in to your Medusa Store account.",
|
||||
title: "Prijava",
|
||||
description: "Prijavite se na svoj Suman račun.",
|
||||
}
|
||||
|
||||
export default function Login() {
|
||||
|
||||
@@ -2,7 +2,7 @@ import Spinner from "@modules/common/icons/spinner"
|
||||
|
||||
export default function Loading() {
|
||||
return (
|
||||
<div className="flex items-center justify-center w-full h-full text-ui-fg-base">
|
||||
<div className="flex items-center justify-center w-full h-full text-foreground">
|
||||
<Spinner size={36} />
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -4,14 +4,14 @@ import InteractiveLink from "@modules/common/components/interactive-link"
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "404",
|
||||
description: "Something went wrong",
|
||||
description: "Nešto nije u redu.",
|
||||
}
|
||||
|
||||
export default function NotFound() {
|
||||
return (
|
||||
<div className="flex flex-col items-center justify-center min-h-[calc(100vh-64px)]">
|
||||
<h1 className="text-2xl-semi text-ui-fg-base">Page not found</h1>
|
||||
<p className="text-small-regular text-ui-fg-base">
|
||||
<h1 className="font-display text-2xl text-foreground">Page not found</h1>
|
||||
<p className="text-sm text-foreground">
|
||||
The cart you tried to access does not exist. Clear your cookies and try
|
||||
again.
|
||||
</p>
|
||||
|
||||
@@ -5,8 +5,8 @@ import { Metadata } from "next"
|
||||
import { notFound } from "next/navigation"
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Cart",
|
||||
description: "View your cart",
|
||||
title: "Korpa",
|
||||
description: "Pregled vaše korpe.",
|
||||
}
|
||||
|
||||
export default async function Cart() {
|
||||
|
||||
@@ -22,12 +22,12 @@ export async function generateMetadata(props: Props): Promise<Metadata> {
|
||||
try {
|
||||
const productCategory = await getCategoryByHandle(params.category)
|
||||
|
||||
const title = productCategory.name + " | Medusa Store"
|
||||
const title = productCategory.name
|
||||
|
||||
const description = productCategory.description ?? `${title} category.`
|
||||
|
||||
return {
|
||||
title: `${title} | Medusa Store`,
|
||||
title: `${title} | Suman d.o.o.`,
|
||||
description,
|
||||
alternates: {
|
||||
canonical: `${params.category.join("/")}`,
|
||||
|
||||
@@ -26,7 +26,7 @@ export async function generateMetadata(props: Props): Promise<Metadata> {
|
||||
}
|
||||
|
||||
const metadata = {
|
||||
title: `${collection.title} | Medusa Store`,
|
||||
title: `${collection.title} | Suman d.o.o.`,
|
||||
description: `${collection.title} collection`,
|
||||
} as Metadata
|
||||
|
||||
|
||||
@@ -1,24 +1,79 @@
|
||||
import { Metadata } from "next"
|
||||
|
||||
import { STORE_NAME } from "@lib/util/site"
|
||||
import { PlaceholderNotice, PolicyPage } from "@modules/policies/templates"
|
||||
import LocalizedClientLink from "@modules/common/components/localized-client-link"
|
||||
import footerConfig from "@/config/footer.json"
|
||||
|
||||
export const dynamic = "force-static"
|
||||
export const revalidate = 60
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Contact",
|
||||
description: `How to contact ${STORE_NAME}.`,
|
||||
title: "Kontakt",
|
||||
description: `Kontakt i upiti za ${STORE_NAME}: telefon, email i adresa u Gračanici.`,
|
||||
}
|
||||
|
||||
export default function ContactPage() {
|
||||
const { phone, email, address } = footerConfig.contact
|
||||
const channels = [
|
||||
{ label: "Telefon", value: phone, href: `tel:${phone.replace(/[^\d+]/g, "")}`, note: "Radnim danima" },
|
||||
{ label: "Email", value: email, href: `mailto:${email}`, note: "Odgovor u roku od jednog radnog dana" },
|
||||
{ label: "Proizvodnja i lager", value: address, href: null, note: "Lično preuzimanje narudžbi" },
|
||||
]
|
||||
|
||||
return (
|
||||
<PolicyPage title="Contact">
|
||||
<PlaceholderNotice />
|
||||
<p>
|
||||
Questions about an order, shipping or returns? Contact {STORE_NAME}{" "}
|
||||
customer service and include your order number.
|
||||
</p>
|
||||
</PolicyPage>
|
||||
<div className="content-container pb-24 sm:pb-32" data-testid="policy-page">
|
||||
<header className="pt-14 sm:pt-20 pb-12 sm:pb-16 text-center">
|
||||
<p className="eyebrow">Kontakt</p>
|
||||
<h1 className="display-heading mt-5 text-4xl sm:text-6xl text-foreground">Razgovarajmo</h1>
|
||||
<p className="mx-auto mt-5 max-w-xl text-sm sm:text-base text-muted-foreground leading-relaxed">
|
||||
Pitanje o narudžbi, dostavi ili opremanju terase? Javite se direktno proizvođaču.
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 rounded-2xl border border-border/80 divide-y md:divide-y-0 md:divide-x divide-border/80">
|
||||
{channels.map((c) => (
|
||||
<div key={c.label} className="flex flex-col justify-between gap-10 p-7 sm:p-9">
|
||||
<p className="eyebrow text-muted-foreground">{c.label}</p>
|
||||
<div>
|
||||
{c.href ? (
|
||||
<a href={c.href} className="font-display text-2xl text-foreground transition-colors hover:text-primary">
|
||||
{c.value}
|
||||
</a>
|
||||
) : (
|
||||
<p className="font-display text-2xl text-foreground">{c.value}</p>
|
||||
)}
|
||||
<p className="mt-2 text-sm text-muted-foreground">{c.note}</p>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<section className="mt-16 sm:mt-24 grid grid-cols-1 lg:grid-cols-12 gap-8 border-t border-border/70 pt-12">
|
||||
<p className="lg:col-span-4 eyebrow text-muted-foreground">Upiti za ponudu</p>
|
||||
<div className="lg:col-span-8">
|
||||
<h2 className="display-heading text-3xl sm:text-4xl text-foreground">
|
||||
Pergole i tende izrađujemo po mjeri
|
||||
</h2>
|
||||
<p className="mt-4 max-w-xl text-sm sm:text-base text-muted-foreground leading-relaxed">
|
||||
Na stranici svakog proizvoda možete poslati upit s odabranim opcijama. Naš tim dolazi na mjerenje i
|
||||
priprema preciznu ponudu.
|
||||
</p>
|
||||
<div className="mt-7 flex flex-col sm:flex-row gap-3">
|
||||
<LocalizedClientLink
|
||||
href="/categories/pergole-i-bioklimatske-tende"
|
||||
className="inline-flex h-11 items-center justify-center rounded-md bg-primary px-6 text-sm text-primary-foreground transition-colors hover:bg-primary/90"
|
||||
>
|
||||
Pergole
|
||||
</LocalizedClientLink>
|
||||
<LocalizedClientLink
|
||||
href="/categories/tende"
|
||||
className="inline-flex h-11 items-center justify-center rounded-md border border-border px-6 text-sm text-foreground transition-colors hover:bg-muted"
|
||||
>
|
||||
Tende
|
||||
</LocalizedClientLink>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,20 +1,34 @@
|
||||
import { Metadata } from "next"
|
||||
|
||||
import InteractiveLink from "@modules/common/components/interactive-link"
|
||||
import LocalizedClientLink from "@modules/common/components/localized-client-link"
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "404",
|
||||
description: "Something went wrong",
|
||||
description: "Stranica nije pronađena.",
|
||||
}
|
||||
|
||||
export default function NotFound() {
|
||||
return (
|
||||
<div className="flex flex-col gap-4 items-center justify-center min-h-[calc(100vh-64px)]">
|
||||
<h1 className="text-2xl-semi text-ui-fg-base">Page not found</h1>
|
||||
<p className="text-small-regular text-ui-fg-base">
|
||||
The page you tried to access does not exist.
|
||||
<div className="content-container flex min-h-[calc(100vh-64px)] flex-col items-center justify-center py-24 text-center">
|
||||
<p className="eyebrow">Greška 404</p>
|
||||
<h1 className="display-heading mt-5 text-4xl sm:text-6xl text-foreground">Stranica nije pronađena</h1>
|
||||
<p className="mt-5 max-w-md text-sm text-muted-foreground leading-relaxed">
|
||||
Stranica koju tražite ne postoji ili je premještena.
|
||||
</p>
|
||||
<InteractiveLink href="/">Go to frontpage</InteractiveLink>
|
||||
<div className="mt-8 flex flex-col sm:flex-row gap-3">
|
||||
<LocalizedClientLink
|
||||
href="/"
|
||||
className="inline-flex h-11 items-center justify-center rounded-md bg-primary px-6 text-sm text-primary-foreground transition-colors hover:bg-primary/90"
|
||||
>
|
||||
Na početnu
|
||||
</LocalizedClientLink>
|
||||
<LocalizedClientLink
|
||||
href="/store"
|
||||
className="inline-flex h-11 items-center justify-center rounded-md border border-border px-6 text-sm text-foreground transition-colors hover:bg-muted"
|
||||
>
|
||||
Katalog proizvoda
|
||||
</LocalizedClientLink>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@ type Props = {
|
||||
params: Promise<{ id: string }>
|
||||
}
|
||||
export const metadata: Metadata = {
|
||||
title: "Order Confirmed",
|
||||
description: "You purchase was successful",
|
||||
title: "Narudžba potvrđena",
|
||||
description: "Vaša narudžba je uspješno zaprimljena.",
|
||||
}
|
||||
|
||||
export default async function OrderConfirmedPage(props: Props) {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Metadata } from "next"
|
||||
|
||||
import Hero from "@modules/home/components/hero"
|
||||
import PartnersTicker from "@modules/home/components/partners-ticker"
|
||||
import ProductShowcase from "@modules/home/components/product-showcase"
|
||||
import MissionSection from "@modules/home/components/mission-section"
|
||||
import CtaBanner from "@modules/home/components/cta-banner"
|
||||
import LatestNews from "@modules/home/components/latest-news"
|
||||
import FaqSection from "@modules/home/components/faq-section"
|
||||
import LandingHero from "@modules/home/components/landing/hero"
|
||||
import LandingMission from "@modules/home/components/landing/mission"
|
||||
import LandingMethod from "@modules/home/components/landing/method"
|
||||
import LandingProducts from "@modules/home/components/landing/products"
|
||||
import LandingStats from "@modules/home/components/landing/stats"
|
||||
import LandingImpact from "@modules/home/components/landing/impact"
|
||||
import LandingFaq from "@modules/home/components/landing/faq"
|
||||
import { listCollections } from "@lib/data/collections"
|
||||
import { getRegion, listRegions } from "@lib/data/regions"
|
||||
import { toJsonLd } from "@lib/util/product-structured-data"
|
||||
@@ -94,13 +94,13 @@ export default async function Home(props: {
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: toJsonLd(structuredData) }}
|
||||
/>
|
||||
<Hero />
|
||||
<PartnersTicker />
|
||||
<ProductShowcase />
|
||||
<MissionSection />
|
||||
<CtaBanner />
|
||||
<LatestNews />
|
||||
<FaqSection />
|
||||
<LandingHero />
|
||||
<LandingMission />
|
||||
<LandingMethod />
|
||||
<LandingProducts />
|
||||
<LandingStats />
|
||||
<LandingImpact />
|
||||
<LandingFaq />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -7,22 +7,22 @@ export const dynamic = "force-static"
|
||||
export const revalidate = 60
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Privacy policy",
|
||||
description: `How ${STORE_NAME} collects and uses personal data.`,
|
||||
title: "Politika privatnosti",
|
||||
description: `Kako ${STORE_NAME} prikuplja i koristi lične podatke.`,
|
||||
}
|
||||
|
||||
export default function PrivacyPage() {
|
||||
return (
|
||||
<PolicyPage title="Privacy policy">
|
||||
<PolicyPage title="Politika privatnosti">
|
||||
<PlaceholderNotice />
|
||||
<p>
|
||||
{STORE_NAME} collects the information you provide at checkout, such as
|
||||
your name, email address and shipping address, to process and deliver
|
||||
your order.
|
||||
{STORE_NAME} prikuplja podatke koje unesete prilikom narudžbe, poput
|
||||
imena, email adrese i adrese dostave, kako bi obradio i isporučio vašu
|
||||
narudžbu.
|
||||
</p>
|
||||
<p>
|
||||
Payment details are handled by our payment provider and are not stored
|
||||
by the store. Cookies are used to keep your cart and sign-in session.
|
||||
Podatke o plaćanju obrađuje naš procesor plaćanja i trgovina ih ne
|
||||
čuva. Kolačići se koriste za čuvanje korpe i prijave na račun.
|
||||
</p>
|
||||
</PolicyPage>
|
||||
)
|
||||
|
||||
@@ -7,8 +7,8 @@ export const dynamic = "force-static"
|
||||
export const revalidate = 60
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Return policy",
|
||||
description: "How to return items and get a refund.",
|
||||
title: "Povrat robe",
|
||||
description: "Kako vratiti proizvod i dobiti povrat novca.",
|
||||
}
|
||||
|
||||
export default async function ReturnsPage(props: {
|
||||
@@ -18,17 +18,17 @@ export default async function ReturnsPage(props: {
|
||||
const { current } = await getStorePolicies(countryCode)
|
||||
|
||||
return (
|
||||
<PolicyPage title="Return policy">
|
||||
<PolicyPage title="Povrat robe">
|
||||
{current ? (
|
||||
<>
|
||||
<p>
|
||||
You can return items within {current.returnWindowDays} days of
|
||||
delivery. Items are returned by mail.
|
||||
Proizvode možete vratiti u roku od {current.returnWindowDays} dana od
|
||||
isporuke. Povrat se šalje poštom.
|
||||
</p>
|
||||
<p>
|
||||
{current.freeReturns
|
||||
? "Return shipping is free."
|
||||
: "Return shipping costs are paid by the customer."}
|
||||
? "Troškove povrata snosimo mi."
|
||||
: "Troškove povrata snosi kupac."}
|
||||
</p>
|
||||
</>
|
||||
) : (
|
||||
|
||||
@@ -42,22 +42,22 @@ export default async function SearchPage(props: Props) {
|
||||
|
||||
return (
|
||||
<div className="content-container py-6" data-testid="search-container">
|
||||
<h1 className="text-2xl-semi mb-6">
|
||||
<h1 className="font-display text-2xl mb-6">
|
||||
{query ? `Search results for "${query}"` : "Search"}
|
||||
</h1>
|
||||
<SearchForm countryCode={countryCode} defaultValue={query} className="mb-8 max-w-xl" />
|
||||
{query && (
|
||||
<p className="text-small-regular text-ui-fg-subtle mb-6">
|
||||
<p className="text-sm text-muted-foreground mb-6">
|
||||
{response.count} {response.count === 1 ? "product" : "products"} found
|
||||
</p>
|
||||
)}
|
||||
{query && response.products.length === 0 ? (
|
||||
<p className="text-ui-fg-subtle">
|
||||
<p className="text-muted-foreground">
|
||||
No products match your search. Try a different keyword.
|
||||
</p>
|
||||
) : (
|
||||
<ul
|
||||
className="grid grid-cols-2 w-full small:grid-cols-3 medium:grid-cols-4 gap-x-6 gap-y-8"
|
||||
className="grid grid-cols-2 w-full lg:grid-cols-3 xl:grid-cols-4 gap-x-6 gap-y-8"
|
||||
data-testid="search-results"
|
||||
>
|
||||
{response.products.map((product) => (
|
||||
|
||||
@@ -11,8 +11,8 @@ export const dynamic = "force-static"
|
||||
export const revalidate = 60
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Shipping information",
|
||||
description: "Shipping rates and delivery times.",
|
||||
title: "Dostava",
|
||||
description: "Cijene i rokovi dostave.",
|
||||
}
|
||||
|
||||
export default async function ShippingPage(props: {
|
||||
@@ -22,16 +22,16 @@ export default async function ShippingPage(props: {
|
||||
const { current, currencyCode } = await getStorePolicies(countryCode)
|
||||
|
||||
return (
|
||||
<PolicyPage title="Shipping information">
|
||||
<PolicyPage title="Dostava">
|
||||
{current ? (
|
||||
<>
|
||||
<p>
|
||||
Orders to {countryCode.toUpperCase()} ship with the following rates
|
||||
and delivery times.
|
||||
Za narudžbe u {countryCode.toUpperCase()} važe sljedeće cijene i rokovi
|
||||
dostave.
|
||||
</p>
|
||||
<ShippingSummary policies={current} currencyCode={currencyCode} />
|
||||
<p className="text-ui-fg-subtle">
|
||||
Available shipping methods and final costs are shown at checkout.
|
||||
<p className="text-muted-foreground">
|
||||
Dostupni načini dostave i konačna cijena prikazuju se u koraku plaćanja.
|
||||
</p>
|
||||
</>
|
||||
) : (
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
import { Metadata } from "next"
|
||||
import { notFound } from "next/navigation"
|
||||
|
||||
import { listProducts } from "@lib/data/products"
|
||||
import { getRegion } from "@lib/data/regions"
|
||||
import { getSaleInfo, SaleInfo } from "@lib/util/sale-scenario"
|
||||
import CatalogHeader from "@modules/store/components/catalog-header"
|
||||
import StoreTemplate from "@modules/store/templates"
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Store",
|
||||
description: "Explore all of our products.",
|
||||
title: "Katalog proizvoda",
|
||||
description:
|
||||
"Profesionalni suncobrani, bioklimatske pergole i tende iz vlastite proizvodnje.",
|
||||
}
|
||||
|
||||
export default async function StorePage(props: {
|
||||
@@ -19,5 +23,29 @@ export default async function StorePage(props: {
|
||||
notFound()
|
||||
}
|
||||
|
||||
return <StoreTemplate currencyCode={region.currency_code} />
|
||||
// Search hits carry no metadata, so resolve each product's sale scenario here
|
||||
const {
|
||||
response: { products },
|
||||
} = await listProducts({
|
||||
countryCode,
|
||||
queryParams: { limit: 100, fields: "handle,+metadata" },
|
||||
})
|
||||
const saleByHandle: Record<string, SaleInfo> = Object.fromEntries(
|
||||
products
|
||||
.filter((p) => p.handle)
|
||||
.map((p) => [p.handle as string, getSaleInfo(p.metadata)])
|
||||
)
|
||||
|
||||
return (
|
||||
<div className="content-container pb-20 sm:pb-28" data-testid="category-container">
|
||||
<CatalogHeader
|
||||
kicker="Katalog"
|
||||
title="Sistemi za zaštitu od sunca"
|
||||
description="Suncobrani koje možete konfigurisati i naručiti online, te pergole i tende po mjeri vašeg prostora."
|
||||
activeHandle={null}
|
||||
titleTestId="store-page-title"
|
||||
/>
|
||||
<StoreTemplate currencyCode={region.currency_code} saleByHandle={saleByHandle} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -7,22 +7,22 @@ export const dynamic = "force-static"
|
||||
export const revalidate = 60
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Terms of service",
|
||||
description: `Terms that apply to purchases from ${STORE_NAME}.`,
|
||||
title: "Uslovi poslovanja",
|
||||
description: `Uslovi koji važe za kupovinu kod ${STORE_NAME}.`,
|
||||
}
|
||||
|
||||
export default function TermsPage() {
|
||||
return (
|
||||
<PolicyPage title="Terms of service">
|
||||
<PolicyPage title="Uslovi poslovanja">
|
||||
<PlaceholderNotice />
|
||||
<p>
|
||||
By placing an order with {STORE_NAME} you agree to these terms. Prices,
|
||||
product availability and shipping options are shown on the product
|
||||
pages and at checkout, and may change without notice.
|
||||
Narudžbom kod {STORE_NAME} prihvatate ove uslove. Cijene, dostupnost
|
||||
proizvoda i opcije dostave prikazane su na stranicama proizvoda i u
|
||||
koraku plaćanja, i mogu se mijenjati bez prethodne najave.
|
||||
</p>
|
||||
<p>
|
||||
Orders are confirmed by email once payment is received. Returns and
|
||||
refunds are handled according to our return policy.
|
||||
Narudžbe potvrđujemo emailom nakon prijema uplate. Povrat robe i novca
|
||||
rješavamo prema pravilima o povratu.
|
||||
</p>
|
||||
</PolicyPage>
|
||||
)
|
||||
|
||||
@@ -4,8 +4,8 @@ import { Suspense } from "react"
|
||||
import VerifyAccount from "@modules/account/components/verify-account"
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Verify your email",
|
||||
description: "Verify your email address to complete your registration.",
|
||||
title: "Potvrda email adrese",
|
||||
description: "Potvrdite email adresu da završite registraciju.",
|
||||
}
|
||||
|
||||
export default function VerifyAccountPage() {
|
||||
@@ -13,7 +13,7 @@ export default function VerifyAccountPage() {
|
||||
<div className="w-full flex justify-center px-8 py-12">
|
||||
<Suspense
|
||||
fallback={
|
||||
<p className="text-base-regular text-ui-fg-base">
|
||||
<p className="text-base text-foreground">
|
||||
Verifying your email...
|
||||
</p>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user