Skip to content

Commit

Permalink
feature publish pelico activity from dashboard admin
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-pages committed Oct 21, 2024
1 parent 68405f5 commit e19a874
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function ActivityCard({
modifiedDisabled,
}: {
activity: Pick<Activity, 'images' | 'content' | 'phase' | 'data' | 'id' | 'status'>;
modifiedDisabled: boolean;
modifiedDisabled?: boolean;
}) {
const publishActivity = usePublishActivity({ activityId: activity.id });
const queryClient = useQueryClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const AllActivitiesAdmin = ({ activities, search }: Props) => {
>
{filteredActivities().map((activity) => (
<div key={activity.id} style={{ width: isMobile ? '100%' : '50%' }}>
<ActivityCardAdmin {...activity} />
<ActivityCardAdmin activity={activity} />
</div>
))}
</div>
Expand Down
2 changes: 0 additions & 2 deletions src/pages/admin/newportal/contenulibre/edit/2/[id]/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Image from 'next/image';
import { useRouter } from 'next/router';
import React from 'react';
import { QueryClient } from 'react-query';

import { TextField, Switch, Button } from '@mui/material';

Expand Down Expand Up @@ -29,7 +28,6 @@ const ContenuLibre = () => {
const [selectedImageUrl, setSelectedImageUrl] = React.useState<string | undefined>(undefined);
const [isAllImagesModalOpen, setIsAllImagesModalOpen] = React.useState(false);
const [isImageModalOpen, setIsImageModalOpen] = React.useState(false);
const queryClient = new QueryClient();

const data = (activity?.data as FreeContentData) || null;

Expand Down
3 changes: 0 additions & 3 deletions src/pages/admin/newportal/contenulibre/edit/3/[id]/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import classNames from 'classnames';
import Link from 'next/link';
import { useRouter } from 'next/router';
import React from 'react';

Expand All @@ -8,7 +7,6 @@ import Button from '@mui/material/Button';
import CircularProgress from '@mui/material/CircularProgress';

import Layout from '../../../layout';
import type { FreeContentData } from 'src/activity-types/freeContent.types';
import { useGetOneActivityById } from 'src/api/activities/activities.getOneById';
import { Base } from 'src/components/Base';
import { StepsButton } from 'src/components/StepsButtons';
Expand All @@ -18,7 +16,6 @@ import { ContentView } from 'src/components/activities/content/ContentView';
import { EditButton } from 'src/components/buttons/EditButton';
import { UserContext } from 'src/contexts/userContext';
import { useActivity } from 'src/hooks/useActivity';
import { ActivityStatus } from 'types/activity.type';

const ContenuLibre = () => {
const router = useRouter();
Expand Down

0 comments on commit e19a874

Please sign in to comment.