This commit is contained in:
mmacierzanka committed 2021-10-07 20:52:30 +02:00
commit d256925d25
7 files changed
+20 -51

No files matched your search

@@ -2,7 +2,9 @@ import { BIcon } from "../BIcon";
import styles from "./index.module.scss";
import { EventType } from "../EventType";
import { API_CLIENT } from "../../constants";
import { useHistory } from "react-router-dom";
export const EventPreviewEdit = (props) => {
const history = useHistory();
const getDate = (time) => {
let date = new Date(time);
return date.toLocaleDateString(navigator.language);
@@ -17,6 +19,7 @@ export const EventPreviewEdit = (props) => {
const deleteItem = (arg) => {
console.log("deleting..." + arg);
API_CLIENT.deleteEvent({ id: arg });
history.push("/");
};
return (
<div className={styles.link}>
@@ -3,7 +3,7 @@
.title {
color: $accent;
text-align: center;
font-size: 2.1em;
font-size: 1.8em;
font-weight: bold;
}
+3 -2
View File
@@ -1,4 +1,4 @@
// import styles from "./index.module.scss";
import styles from "./index.module.scss";
import { Stack } from "react-bootstrap";
import { useState, useEffect } from "react";
import { API_CLIENT } from "../../constants";
@@ -16,7 +16,7 @@ export const Dashboard = () => {
if (data !== "not logged") {
API_CLIENT.getUserEvents(data.email).then((events) => {
if (events) {
array.push(events);
array = events;
console.log(array);
render();
}
@@ -51,6 +51,7 @@ export const Dashboard = () => {
};
return (
<div className={container}>
<p className={styles.title}>Tu możesz zarządzać swoimi wydarzeniami</p>
<Stack gap={1}>{list}</Stack>
</div>
);
@@ -0,0 +1,8 @@
@import "../../index.scss";
.title {
color: $accent;
text-align: center;
font-size: 1.8em;
font-weight: bold;
}