Skip to content

Commit

Permalink
Change app name to OpeningHoursEditor
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperbirch1 committed Mar 13, 2024
1 parent e30239c commit d4f803c
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 25 deletions.
16 changes: 0 additions & 16 deletions src/apps/calendar/calendar.dev.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions src/apps/calendar/calendar.mount.ts

This file was deleted.

16 changes: 16 additions & 0 deletions src/apps/opening-hours-editor/OpeningHoursEditor.dev.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { ComponentMeta, ComponentStory } from "@storybook/react";
import React from "react";
import serviceUrlArgs from "../../core/storybook/serviceUrlArgs";
import OpeningHoursEditor from "./OpeningHoursEditor.entry";

export default {
title: "Apps / OpeningHoursEditor",
component: OpeningHoursEditor,
argTypes: {
...serviceUrlArgs
}
} as ComponentMeta<typeof OpeningHoursEditor>;

export const App: ComponentStory<typeof OpeningHoursEditor> = (args) => (
<OpeningHoursEditor {...args} />
);
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import React from "react";
import GuardedApp from "../../components/guarded-app";
import { withText } from "../../core/utils/text";

import Calendar from "./calendar";
import { withUrls } from "../../core/utils/url";
import OpeningHoursEditor from "./OpeningHoursEditor";

const CalendarEntry: React.FC = () => (
<GuardedApp app="calendar">
<Calendar />
<OpeningHoursEditor />
</GuardedApp>
);

Expand Down
4 changes: 4 additions & 0 deletions src/apps/opening-hours-editor/OpeningHoursEditor.mount.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import addMount from "../../core/addMount";
import OpeningHoursEditor from "./OpeningHoursEditor.entry";

addMount({ appName: "calendar", app: OpeningHoursEditor });
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { DateSelectArg, EventInput } from "@fullcalendar/core";
import { useDplOpeningHoursListGET } from "../../core/dpl-cms/dpl-cms";
import formatCmsEventsToFullCalendar from "./helper";

const Calendar: React.FC = () => {
const OpeningHoursEditor: React.FC = () => {
const { data: openingHoursData } = useDplOpeningHoursListGET();
const [events, setEvents] = useState<EventInput[]>([]);

Expand Down Expand Up @@ -73,4 +73,4 @@ const Calendar: React.FC = () => {
);
};

export default Calendar;
export default OpeningHoursEditor;
File renamed without changes.

0 comments on commit d4f803c

Please sign in to comment.