Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Zen-cronic committed Nov 22, 2023
1 parent 3bca7d4 commit dd2f972
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 1,026 deletions.
12 changes: 12 additions & 0 deletions client/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ label.total_volunteers_label{
margin: 10px;
}

body.public_layout {

display: flex;
flex-direction: column;
min-height: 100vh;

}

main.public_layout {
flex-grow: 1;
}

/* 992px expand:lg */
@media screen and (max-width: 992px) {

Expand Down
43 changes: 20 additions & 23 deletions client/src/components/Layout.jsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
import { Outlet } from 'react-router-dom'
import useAuth from '../hooks/useAuth'
import PublicHeader from './PublicHeader'
import { ToastContainer } from 'react-toastify'
import PublicFooter from './PublicFooter'
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 displayPublic = !volunId && !role
return (
<body className="public_layout">
{displayPublic && <PublicHeader />}
<main className="public_layout">

return (

<body className='d-flex flex-column min-vh-100'>
{displayPublic && <PublicHeader/>}
<main className=' flex-grow-1'>
<ToastContainer/>

<Outlet/>
</main>


{displayPublic && <PublicFooter/>}
</body>
)
}
export default Layout
<ToastContainer />
<Outlet />
</main>

{displayPublic && <PublicFooter />}
</body>
);
};
export default Layout;
5 changes: 3 additions & 2 deletions client/src/components/PublicEvents.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import SortedEventsList from "../features/event/sort/SortedEventsList";
import FilteredEventList from "../features/event/filter/FilteredEventList";

const PublicEvents = () => {
const authData = useAuth();

// const authData = useAuth();
const content = (
<>
<EventHeader />
Expand All @@ -23,7 +24,7 @@ const PublicEvents = () => {
</>
);

console.log("guest info: ", authData);
// console.log("guest info: ", authData);
return content;
};

Expand Down
5 changes: 3 additions & 2 deletions client/src/components/PublicPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ const PublicPage = () => {
<Button as={Link} variant="primary" to="/login" className=" me-3">
Sign In
</Button>
<Badge className="me-3" bg="info" pill>
or
<Badge className="me-3 d-flex align-items-center justify-content-center" bg="info" pill>
or

</Badge>
<Button as={Link} variant="primary" to="/register">
Register
Expand Down
2 changes: 1 addition & 1 deletion client/src/features/auth/AuthFormContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const AuthFormContainer = ({children}) => {


return (
<Container>
<Container className='my-3'>
<Row className='justify-content-md-center mt-5'>
<Col xs={12} md={6} className='card p-5' >
{children}
Expand Down
8 changes: 4 additions & 4 deletions client/src/features/event/form/AddEventDateAndShiftTime.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ const AddEventDateAndShiftTime = ({

// const handleShiftStartChange = (e) =>
return (
<Row>
<Col >
<Row >
<Col xs={12} sm={6} md={4} lg={3}>
{<DatePickerForm eventDate={eventDate} updateEvent={updateEvent} eventId={eventId}/>}
</Col>

<Col xs={1}>
{/* <Col xs={1}>
</Col>
</Col> */}
<Col>

{/* {timePickerForm} */}
Expand Down
6 changes: 3 additions & 3 deletions client/src/features/event/form/EditEventForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -404,12 +404,12 @@ const EditEventForm = ({ event, eventId }) => {

<Row>
<Col>Event Dates</Col>
<Col xs={1}></Col>
{/* <Col xs={1}></Col> */}

<Col>ShiftStart Time</Col>
<Col>ShiftEnd Time</Col>
<Col>Shift Posituios</Col>
<Col xs={1}></Col>
{/* <Col xs={1}></Col> */}
</Row>
<Row>
<br></br>
Expand All @@ -434,7 +434,7 @@ const EditEventForm = ({ event, eventId }) => {

<Row>
<Col>
<Button type="button" variant="warning" onClick={handleShowModal}>
<Button type="button" variant="success" onClick={handleShowModal}>
Edit Event
</Button>

Expand Down
Loading

0 comments on commit dd2f972

Please sign in to comment.