Skip to content

Commit

Permalink
Merge pull request #29 from No-Country-simulation/frontend-fixes
Browse files Browse the repository at this point in the history
Frontend fixes for demo day
  • Loading branch information
lazaronazareno authored Sep 28, 2024
2 parents 7184d2d + 087871e commit 9ab6c22
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default async function Home() {

{/* Card */}
<Suspense fallback={<AlbumFeedSkeleton />}>
{albumResults.map((album) => (
{albumResults.reverse().map((album) => (
<CardFeed key={album.id} album={album} />
))}
</Suspense>
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/app/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import SearchResults from "@/components/SearchResults"
import SearchResultsSkeleton from "@/ui/skeleton/searchResultsSkeleton";
import { Suspense } from "react";

export const revalidate = 0

export default async function SearchPage({
searchParams,
}: {
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/Comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function Comments({ comments, albumId, feed }: CommentsProps) {
</button>
)}
{showComments && (
<div className={`${feed ? 'absolute top-10 right-0 -left-[60px] min-w-[455px] w-[455px] h-max min-h-[250px] max-h-[500px] overflow-y-scroll bg-white border border-FondoPrimary shadow-lg z-10 rounded-lg p-4' : ''}`}>
<div className={`${feed ? 'absolute top-10 right-0 -left-[56px] min-w-[362px] w-[362px] h-max min-h-[250px] max-h-[500px] overflow-y-scroll bg-white border border-FondoPrimary shadow-lg z-10 rounded-lg p-4' : ''}`}>
<div>
<h3 className="text-lg font-semibold mb-2">Comentarios</h3>
{allComments.length > 0 ? (
Expand All @@ -81,7 +81,7 @@ export function Comments({ comments, albumId, feed }: CommentsProps) {
)}
</div>
{feed && (
<button type="button" onClick={() => setShowComments(!showComments)} className="absolute top-3 right-0 flex justify-center items-center text-lg font-bold bg-FondoPrimary text-white rounded-full size-7 cursor-pointer">x</button>
<button type="button" onClick={() => setShowComments(!showComments)} className="absolute top-3 right-2 flex justify-center items-center text-lg font-bold bg-FondoPrimary text-white rounded-full size-7 cursor-pointer">x</button>
)}
{token ? (
<form className="mt-4" onSubmit={handleSubmit}>
Expand All @@ -101,7 +101,7 @@ export function Comments({ comments, albumId, feed }: CommentsProps) {
{success && <p className="-mt-4 mx-4 text-end text-green-500 text-xs">{success}</p>}
</form>
) : (
<Link href="/login" className="flex justify-center items-center mt-3 bg-FondoPrimary text-white w-full text-xl rounded h-12">
<Link href="/login" className="flex justify-center items-center text-center mt-3 bg-FondoPrimary text-white w-full text-xl rounded h-16">
Inicia Sesión/Registraté para comentar
</Link>
)}
Expand Down

0 comments on commit 9ab6c22

Please sign in to comment.