Skip to content

Commit 2607271

Browse files
committed
fix: formatting + fix legacyBehaviour
1 parent 3ed83e2 commit 2607271

File tree

20 files changed

+99
-103
lines changed

20 files changed

+99
-103
lines changed

src/modules/account/components/account-nav/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const AccountNav = () => {
1515
<Link
1616
href="/account"
1717
className="flex items-center gap-x-2 text-small-regular py-2"
18-
legacyBehavior
1918
>
2019
<>
2120
<ChevronDown className="transform rotate-90" />
@@ -78,7 +77,6 @@ const AccountNavLink = ({ href, route, children }: AccountNavLinkProps) => {
7877
className={clsx("text-gray-700", {
7978
"text-gray-900 font-semibold": active,
8079
})}
81-
legacyBehavior
8280
>
8381
<>{children}</>
8482
</Link>

src/modules/account/components/order-card/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ const OrderCard = ({ order }: OrderCardProps) => {
6565
)}
6666
</div>
6767
<div className="flex justify-end">
68-
<Link href={`/order/details/${order.id}`} legacyBehavior>
68+
<Link href={`/order/details/${order.id}`}>
6969
<Button variant="secondary">See details</Button>
7070
</Link>
7171
</div>
7272
</div>
73-
);
73+
)
7474
}
7575

7676
export default OrderCard

src/modules/account/components/order-overview/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ const OrderOverview = () => {
3737
You don&apos;t have any orders yet, let us change that {":)"}
3838
</p>
3939
<div className="mt-4">
40-
<Link href="/" passHref legacyBehavior>
40+
<Link href="/" passHref>
4141
<Button>Continue shopping</Button>
4242
</Link>
4343
</div>
4444
</div>
45-
);
45+
)
4646
}
4747

4848
export default OrderOverview

src/modules/account/components/overview/index.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const Overview = ({ orders, customer }: OverviewProps) => {
2424
<Link
2525
href="/account/profile"
2626
className="flex items-center justify-between py-4 border-b border-gray-200 px-8"
27-
legacyBehavior
2827
>
2928
<>
3029
<div className="flex items-center gap-x-2">
@@ -39,7 +38,6 @@ const Overview = ({ orders, customer }: OverviewProps) => {
3938
<Link
4039
href="/account/addresses"
4140
className="flex items-center justify-between py-4 border-b border-gray-200 px-8"
42-
legacyBehavior
4341
>
4442
<>
4543
<div className="flex items-center gap-x-2">
@@ -54,7 +52,6 @@ const Overview = ({ orders, customer }: OverviewProps) => {
5452
<Link
5553
href="/account/orders"
5654
className="flex items-center justify-between py-4 border-b border-gray-200 px-8"
57-
legacyBehavior
5855
>
5956
<>
6057
<div className="flex items-center gap-x-2">
@@ -114,10 +111,7 @@ const Overview = ({ orders, customer }: OverviewProps) => {
114111
orders.slice(0, 5).map((order) => {
115112
return (
116113
<li key={order.id}>
117-
<Link
118-
href={`/order/details/${order.id}`}
119-
legacyBehavior
120-
>
114+
<Link href={`/order/details/${order.id}`}>
121115
<div className="bg-gray-50 flex justify-between items-center p-4">
122116
<div className="grid grid-cols-3 grid-rows-2 text-small-regular gap-x-4 flex-1">
123117
<span className="font-semibold">Date placed</span>

src/modules/cart/components/sign-in-prompt/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ const SignInPrompt = () => {
1111
</p>
1212
</div>
1313
<div>
14-
<Link href="/account/login" legacyBehavior>
14+
<Link href="/account/login">
1515
<Button variant="secondary">Sign in</Button>
1616
</Link>
1717
</div>
1818
</div>
19-
);
19+
)
2020
}
2121

2222
export default SignInPrompt

src/modules/cart/templates/summary.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ const Summary = ({ cart }: SummaryProps) => {
1111
return (
1212
<div className="grid grid-cols-1 gap-y-6">
1313
<CartTotals cart={cart} />
14-
<Link href="/checkout" legacyBehavior>
14+
<Link href="/checkout">
1515
<Button>Go to checkout</Button>
1616
</Link>
1717
</div>
18-
);
18+
)
1919
}
2020

2121
export default Summary

src/modules/checkout/templates/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const CheckoutTemplate = () => {
1515
<Link
1616
href="/cart"
1717
className="text-small-semi text-gray-700 flex items-center gap-x-2 uppercase flex-1 basis-0"
18-
legacyBehavior
1918
>
2019
<>
2120
<ChevronDown className="rotate-90" size={16} />

src/modules/common/components/underline-link/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const UnderlineLink = ({ href, children }: UnderlineLinkProps) => {
1212
<Link
1313
href={href}
1414
className="flex items-center text-large-regular border-b border-current gap-x-4 py-2 transition-all duration-300 group hover:pl-4 hover:pr-1"
15-
legacyBehavior>
15+
>
1616
<>
1717
<span>{children}</span>
1818
<ArrowRight

src/modules/home/components/hero/index.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ const Hero = () => {
2525
fill
2626
sizes="100vw"
2727
style={{
28-
objectFit: "cover"
29-
}} />
28+
objectFit: "cover",
29+
}}
30+
/>
3031
</div>
31-
);
32+
)
3233
}
3334

3435
export default Hero

src/modules/layout/components/cart-dropdown/index.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const CartDropdown = () => {
2020
return (
2121
<div className="h-full z-50" onMouseEnter={open} onMouseLeave={close}>
2222
<Popover className="relative h-full">
23-
<Link href="/cart" passHref legacyBehavior>
23+
<Link href="/cart" passHref>
2424
<Popover.Button className="h-full">{`My Bag (${totalItems})`}</Popover.Button>
2525
</Link>
2626
<Transition
@@ -59,9 +59,11 @@ const CartDropdown = () => {
5959
<div className="flex flex-col flex-1">
6060
<div className="flex items-start justify-between">
6161
<div>
62-
<h3
63-
className="text-base-regular overflow-ellipsis overflow-hidden whitespace-nowrap mr-4 w-[130px]">
64-
<Link href={`/products/${item.variant.product.handle}`} legacyBehavior>
62+
<h3 className="text-base-regular overflow-ellipsis overflow-hidden whitespace-nowrap mr-4 w-[130px]">
63+
<Link
64+
href={`/products/${item.variant.product.handle}`}
65+
legacyBehavior
66+
>
6567
{item.title}
6668
</Link>
6769
</h3>
@@ -106,21 +108,20 @@ const CartDropdown = () => {
106108
})}
107109
</span>
108110
</div>
109-
<Link href="/cart" passHref legacyBehavior>
111+
<Link href="/cart" passHref>
110112
<Button>Go to bag</Button>
111113
</Link>
112114
</div>
113115
</>
114116
) : (
115117
<div>
116118
<div className="flex py-16 flex-col gap-y-4 items-center justify-center">
117-
<div
118-
className="bg-gray-900 text-small-regular flex items-center justify-center w-6 h-6 rounded-full text-white">
119+
<div className="bg-gray-900 text-small-regular flex items-center justify-center w-6 h-6 rounded-full text-white">
119120
<span>0</span>
120121
</div>
121122
<span>Your shopping bag is empty.</span>
122123
<div>
123-
<Link href="/store" legacyBehavior>
124+
<Link href="/store">
124125
<>
125126
<span className="sr-only">Go to all products page</span>
126127
<Button onClick={close}>Explore products</Button>

0 commit comments

Comments
 (0)