mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-12 10:53:51 +00:00
1849b4d39f
* chore: migrate eslint to oxlint * chore: migrate prettier to oxfmt * chore: migrate typescript * chore: toThrow should have a expected value * chore: cast test value as Day * chore: small title fix * chore: mocks should be hoisted * chore: incorrect async useage * chore: test should be inside description * chore: test sohuld include an expeced * chore: oxfmt --------- Co-authored-by: alex-Arc <omnivox@LAPTOP-RC5SNBVV.localdomain>
29 lines
942 B
TypeScript
29 lines
942 B
TypeScript
import useScrollIntoView from '../../../../common/hooks/useScrollIntoView';
|
|
import type { PanelBaseProps } from '../../panel-list/PanelList';
|
|
import * as Panel from '../../panel-utils/PanelUtils';
|
|
import QuickStart from '../../quick-start/QuickStart';
|
|
import type { SettingsOptionId } from '../../useAppSettingsMenu';
|
|
import ManageProjects from './ManageProjects';
|
|
|
|
interface ProjectPanelProps extends PanelBaseProps {
|
|
setLocation: (location: SettingsOptionId) => void;
|
|
}
|
|
|
|
export default function ProjectPanel({ location, setLocation }: ProjectPanelProps) {
|
|
const manageProjectsRef = useScrollIntoView<HTMLDivElement>('list', location);
|
|
|
|
const handleQuickClose = () => {
|
|
setLocation('project');
|
|
};
|
|
|
|
return (
|
|
<>
|
|
<Panel.Header>Project</Panel.Header>
|
|
<QuickStart isOpen={location === 'create'} onClose={handleQuickClose} />
|
|
<div ref={manageProjectsRef}>
|
|
<ManageProjects />
|
|
</div>
|
|
</>
|
|
);
|
|
}
|