Skip to content

Commit

Permalink
corecting a width
Browse files Browse the repository at this point in the history
  • Loading branch information
KristinaDudnyk committed Sep 27, 2023
1 parent 784182d commit 731041a
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 37 deletions.
7 changes: 6 additions & 1 deletion client/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@
}
.App {
text-align: center;
width: 100%;
}

body {
background-color: var(--dark-purple);
color: var(--whity);
width: 100%;

/* padding: none;
margin: none; */
}
Expand Down Expand Up @@ -259,6 +262,7 @@ input:focus {
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(auto, 600px);
gap: 70px;
width: 100%;
}

@media (max-width: 800px) {
Expand All @@ -272,12 +276,13 @@ input:focus {
display: flex;
flex-direction: column;
gap: 30px;
width: 100%;
border-top: 3px solid var(--green);
border-bottom: 3px solid var(--green);
}

iframe {
width: 100%;
/* width: 100%; */
}

.videos-functions {
Expand Down
12 changes: 5 additions & 7 deletions client/src/CardVideo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ import UpdateRating from "./UpdateRating";

export default function CardVideo({ video, setRefreshVideos }) {
return (
<>
<div key={video.id} className="video-container">
<iframe title={video.title} src={video.url} />
<div className="videos-functions">
<UpdateRating video={video} setRefreshVideos={setRefreshVideos} />
</div>
<div key={video.id} className="video-container">
<iframe title={video.title} src={video.url} />
<div className="videos-functions">
<UpdateRating video={video} setRefreshVideos={setRefreshVideos} />
</div>
</>
</div>
);
}
3 changes: 0 additions & 3 deletions client/src/DeleteVideo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@ export default function DeleteVideo({ video, setRefreshVideos }) {

const response = await fetch(
`https://kristinadudnyk-fullstack-project.onrender.com/video/${videoId}`,
// `http://localhost:4500/video/${videoId}`
{
method: "DELETE",
}
);
// console.log(`http://localhost:4500/video/${videoId}`);

console.log("handleDelete response:", response);

const json = await response.json();
Expand Down
31 changes: 14 additions & 17 deletions client/src/DisplayVideos.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export default function DisplayVideos({ refreshVideos, setRefreshVideos }) {
try {
const response = await fetch(
`https://kristinadudnyk-fullstack-project.onrender.com/video`
// "http://localhost:4500/video"
);
const data = await response.json();
console.log("fetchData in Videos", data);
Expand All @@ -24,22 +23,20 @@ export default function DisplayVideos({ refreshVideos, setRefreshVideos }) {
}, [refreshVideos]);

return (
<>
<div>
<ToggleOrderOfVideos
refreshVideos={refreshVideos}
setVideos={setVideos}
/>
<div className="dispay-video-container">
{videos.map((video) => (
<CardVideo
key={video.id}
video={video}
setRefreshVideos={setRefreshVideos}
/>
))}
</div>
<div>
<ToggleOrderOfVideos
refreshVideos={refreshVideos}
setVideos={setVideos}
/>
<div className="dispay-video-container">
{videos.map((video) => (
<CardVideo
key={video.id}
video={video}
setRefreshVideos={setRefreshVideos}
/>
))}
</div>
</>
</div>
);
}
3 changes: 0 additions & 3 deletions client/src/NewVideo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,11 @@ export default function NewVivdeo({ showForm, toggleForm, setRefreshVideos }) {
formData.url.match(/v=([a-zA-Z0-9_-]{11})/)[1]
}`,
};
// console.log(formDataUrlChanged);

try {
setIsSubmitting(true);

const response = await fetch(
`https://kristinadudnyk-fullstack-project.onrender.com/video`,
// "http://localhost:4500/video"
{
method: "POST",
headers: {
Expand Down
1 change: 0 additions & 1 deletion client/src/ToggleOrderOfVideos.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export default function ToggleOrderOfVideos({ refreshVideos, setVideos }) {
const orderQuery = order ? "asc" : "desc";
const response = await fetch(
`https://kristinadudnyk-fullstack-project.onrender.com/video?order=${orderQuery}`
// `http://localhost:4500/video?order=${orderQuery}`
);
const data = await response.json();
console.log("handleToggleOrder in ToggleOrderOfVideos", data);
Expand Down
5 changes: 0 additions & 5 deletions client/src/UpdateRating.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export default function UpdateRating({ video, setRefreshVideos }) {
try {
const response = await fetch(
`https://kristinadudnyk-fullstack-project.onrender.com/video/${video.id}`,
// `http://localhost:4500/video/${video.id}`
{
method: "PATCH",
headers: {
Expand All @@ -17,10 +16,6 @@ export default function UpdateRating({ video, setRefreshVideos }) {
body: JSON.stringify({ rating: counter }),
}
);
// console.log("handleSubmit response:", response);

// const json = await response.json();
// console.log("handleSubmit json:", json);
if (response.ok) {
console.log("Resource updated successfully");
} else {
Expand Down

0 comments on commit 731041a

Please sign in to comment.