Skip to content

Commit

Permalink
Merge pull request #683 from bounswe/FRONTEND-647
Browse files Browse the repository at this point in the history
feat(frontend): last touches
  • Loading branch information
Elifnurdeniz authored Nov 25, 2024
2 parents 0bade0a + ec8243e commit be936e9
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion frontend/src/components/auth/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export default function Login({
<Input
type="username"
label="Username"
variant="bordered"
defaultValue={Cookies.get("username") || ""}
{...register("username", { required: true })}
onChange={(e) => setUsername(e.target.value)}
Expand Down Expand Up @@ -118,7 +119,7 @@ export default function Login({
</form>

<div className="text-center mt-6">
<span className="text-sm">Need to create an account? </span>
<span className="text-sm ">Need to create an account? </span>
<button
onClick={() => {
setIsRegister(true);
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/components/auth/register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export default function Register({
<Input
defaultValue=""
type="text"
variant="bordered"
isRequired
label="Username"
onChange={(e) => setUserName(e.target.value)}
Expand All @@ -81,6 +82,7 @@ export default function Register({
<Input
defaultValue=""
type="email"
variant="bordered"
isRequired
label="Email"
{...register("email", { required: "Email is required" })}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/post/post-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export default function PostCard({
<p className="text-default-400 text-small">{timePassed}</p>
</div>
<Divider className="mt-1.5 bg-zinc-200" />
<h4 className="text-lg font-semibold leading-none text-black">
<h4 className="text-lg font-semibold leading-none text-default-900">
{title}
</h4>
</CardHeader>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/quiz/quiz-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ export default function PostCard({
<div className="w-[500px] flex flex-col justify-between h-full pt-4">
<CardBody className="px-3 py-0 text-small text-default-600 text-justify leading-relaxed overflow-hidden">
<div className="flex flex-row justify-between w-full">
<h2 className="text-2xl font-semibold leading-none text-black mb-1">
<Link to={`/quiz/${id}/details`} className="text-black hover:underline">
<h2 className="text-2xl font-semibold leading-none text-default-800 mb-1">
<Link to={`/quiz/${id}/details`} className="text-default-800 hover:underline">
{title}
</Link>
</h2>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function Home() {
usePageTitle(isRegister ? "Register" : "Login");

return (
<div className="min-h-screen flex flex-col md:flex-row items-center bg-zinc-50">
<div className="min-h-screen flex flex-col md:flex-row items-center bg-default-50">
{/* Logo Section */}
<div className="w-full md:w-2/3 flex justify-center items-center p-8">
<div className="text-blue-800 text-7xl md:text-9xl font-semibold">
Expand All @@ -23,7 +23,7 @@ export default function Home() {
</div>

{/* Auth Section */}
<div className="w-full md:w-1/3 h-full bg-white shadow-xl">
<div className="w-full md:w-1/3 h-full bg-default-50 shadow-xl">
<div className="flex justify-center items-center min-h-screen p-8">
{isRegister ? (
<Register setIsRegister={setIsRegister} />
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/pages/post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default function Post() {
});
};
return (
<div className="flex flex-col items-center">
<div className="flex flex-col items-center overflow-hidden mb-4">
<Navbar />
<div className="flex flex-col gap-6 mt-4">
{isLoading ? (
Expand Down Expand Up @@ -147,7 +147,6 @@ export default function Post() {
.fill(0)
.map((_, index) => <CommentSkeleton key={index} />)
: comments.map((comment) => (
console.log(comment),
<Suspense key={comment.id} fallback={<CommentSkeleton />}>
<PostCard
id={comment.id}
Expand Down

0 comments on commit be936e9

Please sign in to comment.