diff --git a/src/components/EventPreview/index.js b/src/components/EventPreview/index.js
new file mode 100644
index 0000000..1df7ce3
--- /dev/null
+++ b/src/components/EventPreview/index.js
@@ -0,0 +1,16 @@
+import { Link } from "react-router-dom";
+import { BIcon } from "../BIcon";
+import styles from "./index.module.scss";
+
+export const EventPreview = (props) => {
+ return (
+
+
+ {props.name ?? "Event name"}
+
+ {props.date ?? ""}
+
+
+
+ );
+};
diff --git a/src/components/EventPreview/index.module.scss b/src/components/EventPreview/index.module.scss
new file mode 100644
index 0000000..139aa73
--- /dev/null
+++ b/src/components/EventPreview/index.module.scss
@@ -0,0 +1,21 @@
+@import "../../index.scss";
+
+.link {
+ text-decoration: none;
+ color: black !important;
+}
+
+.item {
+ border: 1px solid black;
+ border-radius: 15px;
+ width: 70vw;
+ max-width: 500px;
+ height: 10vh;
+ margin: 3px auto;
+ padding: 10px 25px;
+}
+
+.location {
+ font-weight: bold;
+ font-size: 1.7em;
+}
diff --git a/src/pages/Home/index.js b/src/pages/Home/index.js
index 6c587dc..e0ee575 100644
--- a/src/pages/Home/index.js
+++ b/src/pages/Home/index.js
@@ -1,7 +1,8 @@
+import axios from "axios";
import { useState, useEffect } from "react";
import { Stack } from "react-bootstrap";
+import { EventPreview } from "../../components/EventPreview";
import styles from "./index.module.scss";
-import axios from "axios";
import { BACKEND_URL } from "../../constants";
export const Home = () => {
@@ -23,16 +24,10 @@ export const Home = () => {
{events.map((e, i) => {
- return (
-
- {e.name}
- {e.date}
-
- );
+ return ;
})}
- więcej
+ więcej
-
);
};
diff --git a/src/pages/Home/index.module.scss b/src/pages/Home/index.module.scss
index 6527258..3a1f41e 100644
--- a/src/pages/Home/index.module.scss
+++ b/src/pages/Home/index.module.scss
@@ -1,24 +1,11 @@
-.item {
- border: 1px solid black;
- border-radius: 15px;
- width: 70vw;
- max-width: 500px;
- height:10vh;
- margin: 0 auto;
- padding-left:25px;
- padding-top:10px;
-}
.con {
width: 70vw;
max-width: 500px;
margin: 0 auto;
font-family: "Poppins", sans-serif;
}
-.location {
- font-weight: bold;
- font-size: 1.7em;
-}
-.more{
- color: #5873FF;
+
+.more {
+ color: #5873ff;
text-align: right;
-}
\ No newline at end of file
+}