-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' expose public events
- Loading branch information
Showing
42 changed files
with
480 additions
and
1,644 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
import { Outlet } from 'react-router-dom' | ||
import useAuth from '../hooks/useAuth' | ||
import PublicHeader from './PublicHeader' | ||
import { ToastContainer } from 'react-toastify' | ||
import { Outlet } from "react-router-dom"; | ||
import useAuth from "../hooks/useAuth"; | ||
import PublicHeader from "./PublicHeader"; | ||
import { ToastContainer } from "react-toastify"; | ||
import PublicFooter from "./PublicFooter"; | ||
|
||
const Layout = () => { | ||
const { volunId, role } = useAuth(); | ||
|
||
const {volunId, role}= useAuth() | ||
const displayPublic = !volunId && !role; | ||
|
||
const displayPublicHeader = !volunId && !role | ||
return ( | ||
<body className="public_layout"> | ||
{displayPublic && <PublicHeader />} | ||
<main className="public_layout"> | ||
|
||
return ( | ||
|
||
<> | ||
{displayPublicHeader && <PublicHeader/>} | ||
<ToastContainer/> | ||
|
||
<Outlet /> | ||
|
||
|
||
</> | ||
) | ||
} | ||
export default Layout | ||
<ToastContainer /> | ||
<Outlet /> | ||
</main> | ||
|
||
{displayPublic && <PublicFooter />} | ||
</body> | ||
); | ||
}; | ||
export default Layout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from "react"; | ||
import EventHeader from "../features/event/EventHeader"; | ||
import EventList from "../features/event/EventList"; | ||
import useAuth from "../hooks/useAuth"; | ||
import { Route, Routes } from "react-router-dom"; | ||
import EventPage from "../features/event/EventPage"; | ||
import SearchedEventsList from "../features/event/search/SearchedEventsList"; | ||
import SortedEventsList from "../features/event/sort/SortedEventsList"; | ||
import FilteredEventList from "../features/event/filter/FilteredEventList"; | ||
|
||
const PublicEvents = () => { | ||
|
||
// const authData = useAuth(); | ||
const content = ( | ||
<> | ||
<EventHeader /> | ||
<Routes> | ||
<Route index={true} element={<EventList />} /> | ||
<Route path=":eventId" element={<EventPage />} /> | ||
<Route path="search" element={<SearchedEventsList />} /> | ||
<Route path="sort" element={<SortedEventsList />} /> | ||
<Route path="filter" element={<FilteredEventList />} /> | ||
</Routes> | ||
</> | ||
); | ||
|
||
// console.log("guest info: ", authData); | ||
return content; | ||
}; | ||
|
||
export default PublicEvents; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from "react"; | ||
import { Button, Col, Container, Row } from "react-bootstrap"; | ||
import { Link } from "react-router-dom"; | ||
|
||
const PublicFooter = () => { | ||
|
||
const content = ( | ||
<footer className=" bg-black text-white position-relative bottom-0 w-100 h-auto"> | ||
<Container className=" pt-4 text-center"> | ||
<Row className="py-2"> | ||
<Col> | ||
{/* <Button as={Link} to='/dash' variant='warning' > */} | ||
<Button as={Link} to="/" variant="warning"> | ||
Home | ||
</Button> | ||
</Col> | ||
|
||
|
||
|
||
<Col> | ||
<p> Copyright © KZH 2023</p> | ||
</Col> | ||
</Row> | ||
</Container> | ||
</footer> | ||
); | ||
return content; | ||
}; | ||
|
||
export default PublicFooter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.