11import { Button } from "@progress/kendo-react-buttons" ;
22import { SvgIcon } from "@progress/kendo-react-common" ;
3- import { Avatar , Breadcrumb , Stepper , StepperChangeEvent } from "@progress/kendo-react-layout" ;
3+ import { Avatar , Breadcrumb , BreadcrumbLinkMouseEvent , Stepper , StepperChangeEvent } from "@progress/kendo-react-layout" ;
44import { FloatingLabel } from "@progress/kendo-react-labels" ;
55import { homeIcon , listUnorderedIcon , lockIcon , pencilIcon , wrenchIcon , xIcon } from "@progress/kendo-svg-icons" ;
66import React from "react" ;
77import { ColorPalette , ColorPaletteChangeEvent , InputSuffix , Switch , TextBox } from "@progress/kendo-react-inputs" ;
88import { Popup } from "@progress/kendo-react-popup" ;
99import { AutoComplete , DropDownList } from "@progress/kendo-react-dropdowns" ;
10+ import { useNavigate } from 'react-router-dom' ;
1011
1112interface DataModel {
1213 id : string ;
@@ -53,6 +54,7 @@ export default function Settings() {
5354 const anchor = React . useRef < any > ( null ) ;
5455 const [ show , setShow ] = React . useState ( false ) ;
5556 const [ color , setColor ] = React . useState < string > ( '' ) ;
57+ const navigate = useNavigate ( ) ;
5658
5759 const handleChange = ( e : StepperChangeEvent ) => {
5860 setValue ( e . value ) ;
@@ -67,10 +69,16 @@ export default function Settings() {
6769 setShow ( false ) ;
6870 } ;
6971
72+ const handleItemSelect = ( e : BreadcrumbLinkMouseEvent ) => {
73+ if ( e . id === 'home' ) {
74+ navigate ( '/' ) ;
75+ }
76+ } ;
77+
7078 return (
7179 < >
7280 < div style = { { minHeight : 'calc(100vh - 106px)' } } className = "flex flex-col p-10 gap-6" >
73- < Breadcrumb data = { breadcrumbItems } className = "!bg-app-surface" />
81+ < Breadcrumb data = { breadcrumbItems } onItemSelect = { handleItemSelect } className = "!bg-app-surface" />
7482 < h1 className = "text-4xl" > Settings</ h1 >
7583
7684 < Stepper items = { stepperItems } value = { value } onChange = { handleChange } />
0 commit comments