From 6d453165430ed58d30aa1e688f249e5174bb38e7 Mon Sep 17 00:00:00 2001 From: Aashay Shah <108337259+aashay28@users.noreply.github.com> Date: Wed, 7 Jun 2023 21:15:17 +0530 Subject: [PATCH] Hover effect on issue cards and search tags #14 (#15) * Hover effect on issue cards and search tags #14 * Update IssuesCard.js with breakpoint * Update LeftSidebar.js with breakpoint --- components/IssuesCard.js | 100 +++++++++++++------ components/LeftSidebar.js | 197 +++++++++++++++++++++++++------------- 2 files changed, 202 insertions(+), 95 deletions(-) diff --git a/components/IssuesCard.js b/components/IssuesCard.js index bbeb894..4954e6f 100644 --- a/components/IssuesCard.js +++ b/components/IssuesCard.js @@ -1,30 +1,72 @@ -import Link from "next/link" +import Link from "next/link"; -export default function IssuesCard({issue}){ - return ( - <> -
-
-

#{issue.issueNumber} {issue.issueTitle}

-
-

{issue.repoTitle}

-
- -
-
-

stars : {issue.repo_stars}

-
-
-

forks : {issue.repo_forks}

-
-
-

lang : {issue.language}

-
-
-

{issue.timeFromNow}

- -
-
- - ) -} \ No newline at end of file +export default function IssuesCard({ issue }) { + return ( + <> +
+
+ +

+ + #{issue.issueNumber} + {" "} + {issue.issueTitle} +

+ +
+ +

+ {" "} + {issue.repoTitle} +

+ +
+
+
+

+ {" "} + stars : {issue.repo_stars} +

+
+
+

+ {" "} + forks : {issue.repo_forks} +

+
+
+

+ {" "} + lang : {issue.language} +

+
+
+

+ {" "} + {issue.timeFromNow} +

+
+
+ + ); +} diff --git a/components/LeftSidebar.js b/components/LeftSidebar.js index 31c033a..7410e67 100644 --- a/components/LeftSidebar.js +++ b/components/LeftSidebar.js @@ -3,75 +3,140 @@ import styles from "@/styles/LeftSidebar.module.css"; import { langs } from "@/helper/Languages"; import Link from "next/link"; import { useRouter } from "next/router"; -import { useState , useEffect } from "react"; +import { useState, useEffect } from "react"; +export default function LeftSidebar() { + const router = useRouter(); -export default function LeftSidebar(){ + function replaceRoute(lang_query) { + router.replace(`/search/${lang_query}`).then(() => router.reload()); + } - const router = useRouter(); - - function replaceRoute(lang_query){ - router.replace(`/search/${lang_query}`).then(() => router.reload()) - } - - return ( - <> -
-
-
-

Basic Search

-
- { - langs.map(lang => { - return ( - replaceRoute(lang.query)}>
{lang.lang_name}
- ) - }) - } - -
+ return ( + <> +
+
+ +
+
+

+ Advance Search +

+ +
-
+
+
+ + + + + + +
+
+ + + + + + +
+
+ + + + + + +
- - ) -} \ No newline at end of file +
+
+
+ + ); +}