Archived
Merge branch 'master' of https://github.com/makoteq/eco-hack
This commit is contained in:
commit
ef03b882f7
3 files changed
+13
-14
No files matched your search
@@ -33,12 +33,10 @@ export const EventPreviewEdit = (props) => {
|
||||
</div>
|
||||
<div className="d-flex justify-content-between align-items-center ">
|
||||
<span className={styles.time}>
|
||||
<BIcon icon="calendar" />
|
||||
{`${getDate(props.data.time)} ${getTime(props.data.time)}` ?? ""}
|
||||
<BIcon icon="calendar" /> {`${getDate(props.data.time)} ${getTime(props.data.time)}` ?? ""}
|
||||
</span>
|
||||
<span className={styles.location}>
|
||||
<BIcon icon="geo-alt-fill" />
|
||||
{props.data.address?.split(", ").splice(0, 2).join(", ")}
|
||||
<BIcon icon="geo-alt-fill" /> {props.data.address?.split(", ").splice(0, 2).join(", ")}
|
||||
</span>
|
||||
</div>
|
||||
<div className="d-flex justify-content-between align-items-center ">
|
||||
|
||||
@@ -14,6 +14,15 @@ export const UserPanel = (props) => {
|
||||
<h3>Zalogowano jako</h3>
|
||||
<h1>{LOGIN_MANAGER.state.email ?? "Nieznany użytkownik"}</h1>
|
||||
<Stack gap={2}>
|
||||
<button
|
||||
aria-label="Dashboard"
|
||||
onClick={() => {
|
||||
props.history?.push("/dashboard");
|
||||
props.close();
|
||||
}}
|
||||
>
|
||||
Dashboard
|
||||
</button>
|
||||
<button
|
||||
aria-label="Wyloguj się"
|
||||
onClick={async () => {
|
||||
@@ -24,15 +33,6 @@ export const UserPanel = (props) => {
|
||||
>
|
||||
<BIcon icon="box-arrow-right" /> Wyloguj się
|
||||
</button>
|
||||
<button
|
||||
aria-label="Dashboard"
|
||||
onClick={() => {
|
||||
props.history?.push("/dashboard");
|
||||
props.close();
|
||||
}}
|
||||
>
|
||||
Dashboard
|
||||
</button>
|
||||
</Stack>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -24,8 +24,9 @@ export class APIClient extends EventEmitter {
|
||||
}
|
||||
|
||||
async deleteEvent(item) {
|
||||
const rq = await axios.post(`${this.#dbUrl}/api/deleteEvent`,item);
|
||||
const rq = await axios.post(`${this.#dbUrl}/api/deleteEvent`, item);
|
||||
if (rq.status !== 200) throw new Error(`Request failed with status code ${rq.status}: ${rq.statusText}`);
|
||||
await this.fetchEvents();
|
||||
return rq.data;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user