Skip to content

Commit

Permalink
Merge pull request #168 from Front-znad-zatoki/frontend/#165-user-das…
Browse files Browse the repository at this point in the history
…hboard-styling

Frontend/#165 user dashboard styling
  • Loading branch information
vieraboschkova authored Apr 13, 2021
2 parents 94ba9b0 + 8ba9395 commit 16b9805
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 12 deletions.
1 change: 0 additions & 1 deletion client/src/components/Footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { CinemaContext } from '../../context/Cinema';

export default function Footer() {
const { currentCinema } = useContext(CinemaContext);
console.log(currentCinema);
return (
<footer className="footer">
<ul className="footer__list">
Expand Down
11 changes: 10 additions & 1 deletion client/src/components/Loader/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
import Loader from 'react-loader-spinner';
import { useContext } from 'react';
import AppTheme from '../../context/Theme/themeColors';
import { ThemeContext } from '../../context/Theme';

function CustomLoader() {
const theme = useContext(ThemeContext)[0];
const currentTheme = AppTheme[theme];
return (
<Loader
type="ThreeDots"
color="#6e093a"
height={100}
width={100}
// timeout={2000}
style={{ textAlign: 'center' }}
style={{
backgroundColor: `${currentTheme.backgroundColor}`,
color: `${currentTheme.textColor}`,
textAlign: 'center',
}}
/>
);
}
Expand Down
1 change: 1 addition & 0 deletions client/src/domain/MovieInfoBar/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
max-width: 900px;
font-size: 1.5rem;
padding-left: 32px;
line-height: 1.5;
&-title {
font-size: 1.5rem;
}
Expand Down
3 changes: 3 additions & 0 deletions client/src/domain/MovieView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,15 @@ function MovieView({ match }) {
return;
}
setCurrentMovie(movie);
setLoading(false);
}, []);
useEffect(() => {
setLoading(true);
if (currentMovie) {
getMovieScreeningsByMovieId(currentMovie._id, setScreenings, setLoading);
getMovieBySlug(match.params.movieSlug, setCurrentMovie, setLoading);
} else {
setLoading(false);
}
}, [currentMovie, movies]);
if (loading)
Expand Down
2 changes: 1 addition & 1 deletion client/src/domain/Orders/OrderDetails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function OrderDetails({ details }) {
data={tickets[0].screening.cinemaHallId.name}
/>
<h3 className="dashboard__header">TICKETS:</h3>
<ul>
<ul className="profile__ticket__list">
{tickets.map((ticket) => {
const seatNr = convertRowsAndColumnsToAlphanumeric(
ticket.seat.row,
Expand Down
2 changes: 1 addition & 1 deletion client/src/domain/Orders/OrderItem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function OrderItem({ id, callback }) {
return (
<li className="profile__list-item">
<p>
ORDER: <span className="order__list-item--bold">{id}: </span>
ORDER: <span className="profile__list-item--bold">{id}: </span>
</p>
<button className="button--submit" onClick={handleDelete}>
Delete order
Expand Down
33 changes: 25 additions & 8 deletions client/src/domain/User/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
align-items: center;
padding: 16px;
list-style-type: none;
width: 75%;
&-details {
display: block;
display: flex;
flex-direction: column;
margin: 8px;
width: 100%;
& .ticket {
width: 100%;
width: unset;
margin: 0;
margin-bottom: 16px;
}
&__item {
padding: 8px 0;
Expand All @@ -22,33 +24,39 @@
&-item {
background-color: #fff;
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: space-between;
color: #000;
padding: 8px;
margin: 8px;
border-radius: 4px;
width: 50vw;
width: 75%;
box-shadow: 1px 1px 3px 0px;
&--bold {
font-size: 20px;
}
& p {
line-height: 1.5;
text-align: left;
font-weight: 700;
padding: 0 8px;
text-transform: uppercase;
font-size: 20px;
}
& .button--submit {
margin: 8px;
width: calc(100% - 16px);
width: 200px;
display: block;
}
& label {
font-weight: 700;
flex-basis: 100%;

display: block;
margin: 8px;
}
& input {
width: 100%;
background-color: #f1f1f1;
padding-left: 8px;
}

&-header {
Expand All @@ -59,6 +67,15 @@
&__form {
display: flex;
align-items: center;
flex-basis: 100%;
justify-content: space-between;
}
&__ticket {
&__list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
grid-gap: 1rem;
}
}
font-family: $font-primary;
font-size: $font-size-secondary;
Expand Down

0 comments on commit 16b9805

Please sign in to comment.