f6d133f285
This PR doesn't support mobile and side-panel modes. The fields tab will be displayed in these cases. ## Demo https://github.com/user-attachments/assets/0b2e699c-2b8e-4212-8c75-00d7d2e25237 --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
28 lines
806 B
TypeScript
28 lines
806 B
TypeScript
import { TasksCard } from '@/activities/tasks/components/TasksCard';
|
|
import { useLayoutRenderingContext } from '@/ui/layout/contexts/LayoutRenderingContext';
|
|
import { RightDrawerProvider } from '@/ui/layout/right-drawer/contexts/RightDrawerContext';
|
|
import styled from '@emotion/styled';
|
|
import { type PageLayoutWidget } from '~/generated/graphql';
|
|
|
|
const StyledContainer = styled.div`
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: 100%;
|
|
`;
|
|
|
|
type TaskWidgetProps = {
|
|
widget: PageLayoutWidget;
|
|
};
|
|
|
|
export const TaskWidget = ({ widget: _widget }: TaskWidgetProps) => {
|
|
const { isInRightDrawer } = useLayoutRenderingContext();
|
|
|
|
return (
|
|
<RightDrawerProvider value={{ isInRightDrawer }}>
|
|
<StyledContainer>
|
|
<TasksCard />
|
|
</StyledContainer>
|
|
</RightDrawerProvider>
|
|
);
|
|
};
|