Skip to content

Commit

Permalink
Merge pull request #846 from cultuurnet/feature/III-5418
Browse files Browse the repository at this point in the history
III-5418 - Make new entry form the default
  • Loading branch information
brampauwelyn authored Nov 23, 2023
2 parents 1db069b + 263b5d1 commit 8578406
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/layouts/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ const Sidebar = () => {
children: t('menu.home'),
},
{
href: '/event',
href: '/create',
iconName: Icons.PLUS_CIRCLE,
children: t('menu.add'),
},
Expand Down
13 changes: 1 addition & 12 deletions src/pages/dashboard/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import {
useGetUserQueryServerSide,
User,
} from '@/hooks/api/user';
import { FeatureFlags, useFeatureFlag } from '@/hooks/useFeatureFlag';
import { PermissionTypes } from '@/layouts/Sidebar';
import { Footer } from '@/pages/Footer';
import type { Event } from '@/types/Event';
Expand Down Expand Up @@ -100,12 +99,6 @@ const CreateMap = {
organizers: '/organizer',
};

const CreateMapLegacy = {
events: '/event',
places: '/event',
organizers: '/organizer',
};

const RowStatus = {
APPROVED: 'APPROVED',
DRAFT: 'DRAFT',
Expand Down Expand Up @@ -519,8 +512,6 @@ const Dashboard = (): any => {
const { t, i18n } = useTranslation();
const { pathname, query, asPath, ...router } = useRouter();

const [isNewCreateEnabled] = useFeatureFlag(FeatureFlags.REACT_CREATE);

const queryClient = useQueryClient();

const [isModalVisible, setIsModalVisible] = useState(false);
Expand Down Expand Up @@ -614,9 +605,7 @@ const Dashboard = (): any => {
'availableTo_asc',
];

const createOfferUrl = isNewCreateEnabled
? CreateMap[tab]
: CreateMapLegacy[tab];
const createOfferUrl = CreateMap[tab];

return [
<Page key="page">
Expand Down
9 changes: 0 additions & 9 deletions src/redirects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ const getRedirects = (
// Only make the permanent redirects really permanent in environments other
// than development, so we don't get permanent redirects on localhost which
// may conflict with other projects.
{
source: '/event',
destination: '/create',
permanent: false,
featureFlag: FeatureFlags.REACT_CREATE,
},
{
source: '/event/:eventId/status',
destination: '/events/:eventId/availability',
Expand All @@ -76,19 +70,16 @@ const getRedirects = (
source: '/event/:eventId/edit',
destination: '/events/:eventId/edit',
permanent: false,
featureFlag: FeatureFlags.REACT_CREATE,
},
{
source: '/event/:eventId/duplicate',
destination: '/events/:eventId/duplicate',
permanent: false,
featureFlag: FeatureFlags.REACT_CREATE,
},
{
source: '/place/:placeId/edit',
destination: '/places/:placeId/edit',
permanent: false,
featureFlag: FeatureFlags.REACT_CREATE,
},
{
source: '/organizer',
Expand Down

0 comments on commit 8578406

Please sign in to comment.