Skip to content

Commit 9f30686

Browse files
committed
final polish:
1 parent db61825 commit 9f30686

File tree

3 files changed

+30
-21
lines changed

3 files changed

+30
-21
lines changed

examples/ecommerce-jewellery-store/src/components/CategoryList.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ export const CategoryList: React.FC<CategoryListProps> = ({ data, title, subtitl
88
const navigate = useNavigate();
99

1010
const onNavigate = (card: CardDescriptor) => {
11-
if (card.collectionText === "AURELIA") {
11+
console.log(card);
12+
if (card.collectionText === `Collection \"AURELIA\"`) {
1213
navigate("/category")
1314
}
1415
}

examples/ecommerce-jewellery-store/src/components/Header.tsx

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,43 @@
1-
import React from 'react';
2-
import { Menu, AppBarSpacer } from "@progress/kendo-react-layout";
1+
import React from "react";
2+
import { Menu, AppBarSpacer, MenuItem } from "@progress/kendo-react-layout";
33
import { Button } from "@progress/kendo-react-buttons";
44
import { SvgIcon } from "@progress/kendo-react-common";
5+
import { useNavigate } from "react-router-dom";
56

67
import {
78
InputPrefix,
89
InputSeparator,
910
TextBox,
10-
Switch
11+
Switch,
1112
} from "@progress/kendo-react-inputs";
1213

13-
14-
import { searchIcon, userIcon, cartIcon, paletteIcon } from "@progress/kendo-svg-icons";
15-
import viloraLogo from '@/assets/vilora-logo.png';
16-
import items from '@/data/items'
17-
import languageItems from '@/data/language-items';
18-
1914
import {
20-
AppBar,
21-
AppBarSection,
22-
} from "@progress/kendo-react-layout";
15+
searchIcon,
16+
userIcon,
17+
cartIcon,
18+
paletteIcon,
19+
} from "@progress/kendo-svg-icons";
20+
import viloraLogo from "@/assets/vilora-logo.png";
21+
import items from "@/data/items";
22+
import languageItems from "@/data/language-items";
23+
24+
import { AppBar, AppBarSection } from "@progress/kendo-react-layout";
2325

2426
const Header: React.FC = () => {
27+
const navigate = useNavigate();
28+
2529
return (
2630
<>
2731
<AppBar themeColor="inherit">
28-
<AppBarSection className="k-align-items-center" style={{ paddingLeft: '50px' }}>
29-
<a href="#" className="k-d-sm-flex" style={{ marginRight: '50px' }}>
32+
<AppBarSection
33+
className="k-align-items-center"
34+
style={{ paddingLeft: "50px" }}
35+
>
36+
<a href="#" className="k-d-sm-flex" style={{ marginRight: "50px" }}>
3037
<img src={viloraLogo} alt="Logo" />
3138
</a>
32-
<Menu items={items} />
39+
<Menu items={items}>
40+
</Menu>
3341
</AppBarSection>
3442

3543
<AppBarSection>
@@ -39,16 +47,15 @@ const Header: React.FC = () => {
3947
<>
4048
<InputPrefix orientation="horizontal">
4149
<span className="k-input-prefix-text">
42-
<SvgIcon icon={searchIcon} size="medium" />
43-
50+
<SvgIcon icon={searchIcon} size="medium" />
4451
</span>
4552
</InputPrefix>
4653
<InputSeparator />
4754
</>
4855
)}
4956
style={{ width: 300 }}
5057
/>
51-
<div style={{ marginLeft: '20px' }}>
58+
<div style={{ marginLeft: "20px" }}>
5259
<Button svgIcon={userIcon} fillMode="flat" className="k-ml-2" />
5360
<Button svgIcon={cartIcon} fillMode="flat" className="k-ml-2" />
5461
<Button svgIcon={paletteIcon} fillMode="flat" className="k-ml-2" />
@@ -57,7 +64,7 @@ const Header: React.FC = () => {
5764

5865
<AppBarSpacer style={{ width: 4 }} />
5966

60-
<AppBarSection style={{ marginRight: '50px' }}>
67+
<AppBarSection style={{ marginRight: "50px" }}>
6168
<Switch />
6269
<Menu items={languageItems} />
6370
</AppBarSection>

examples/ecommerce-jewellery-store/src/data/items.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
const items = [
22
{
33
"text": "Home",
4+
"url": "/"
45
},
56
{
67
"text": "Jewelry",
7-
"items": [{ "text": "Bracelets" }, { "text": "Rings" }, { "text": "Earings" }, { "text": "Watches" },{ "text": "All" }]
8+
"items": [{ "text": "Bracelets" }, { "text": "Rings" }, { "text": "Earings" }, { "text": "Watches" },{ "text": "All" }],
89
},
910
{
1011
"text": "Blog"

0 commit comments

Comments
 (0)