Skip to content

Commit

Permalink
Tror det funker
Browse files Browse the repository at this point in the history
  • Loading branch information
Magnus committed Oct 13, 2020
1 parent a5eea71 commit 0c88b58
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/BackOffice/AddPost.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ const AddPost = ({
address,
googleMaps,
timeOnEveryPost,
updateCallback,
],
);

Expand Down
14 changes: 13 additions & 1 deletion src/BackOffice/CreateNewEvent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import LocationFields from "./form-fields/LocationFields";
import LinkFields from "./form-fields/LinkFields";
import GroupPicker from "./form-fields/GroupPicker";
import EventWithPosts from "./EventWithPosts";
import uuid from "react-uuid";

const CreateNewEvent = ({
editing,
Expand Down Expand Up @@ -49,7 +50,18 @@ const CreateNewEvent = ({
const [linkTextEN, setLinkTextEN] = useState(linkText_EN);

/** Her er syntaxen til subeventene */
const [posts, setPosts] = useState([]);
const [posts, setPosts] = useState(
[
{
id: uuid(),
title: "",
startGroup: "",
address: "",
googleMaps: "",
timeOnEveryPost: ""
}
]
);

/** *************************************************************************** */

Expand Down
2 changes: 1 addition & 1 deletion src/BackOffice/EventWithPosts.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import React, { useCallback, useState } from "react";
import AddPost from "./AddPost";
import AddEventButton from "./AddEventButton";
import uuid from "react-uuid";
Expand Down

0 comments on commit 0c88b58

Please sign in to comment.