Separate Client Portal & Dashboard
This commit is contained in:
15
frontend/dashboard/src/hooks/useTabs.ts
Normal file
15
frontend/dashboard/src/hooks/useTabs.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { useState } from 'react';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export default function useTabs(defaultValues?: string) {
|
||||
const [currentTab, setCurrentTab] = useState(defaultValues || '');
|
||||
|
||||
return {
|
||||
currentTab,
|
||||
onChangeTab: (event: React.SyntheticEvent<Element, Event>, newValue: any) => {
|
||||
setCurrentTab(newValue);
|
||||
},
|
||||
setCurrentTab,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user