From 46d85677dd772d81ec89920429ea3e8b6f34b9ae Mon Sep 17 00:00:00 2001 From: = <=> Date: Mon, 18 Sep 2023 12:30:22 +0530 Subject: [PATCH] added skeleton loading feature --- components/LeftSidebar.js | 8 +------- pages/search/[lang].js | 36 +----------------------------------- 2 files changed, 2 insertions(+), 42 deletions(-) diff --git a/components/LeftSidebar.js b/components/LeftSidebar.js index 7410e67..937346c 100644 --- a/components/LeftSidebar.js +++ b/components/LeftSidebar.js @@ -3,15 +3,10 @@ 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"; export default function LeftSidebar() { const router = useRouter(); - function replaceRoute(lang_query) { - router.replace(`/search/${lang_query}`).then(() => router.reload()); - } - return ( <>
{ return ( replaceRoute(lang.query)} >
{ - // // console.log("rendering",router.query.lang) - // // if(prevRoute != router.query.lang){ - // // setprevRoute(router.query.lang); - // // window.location.reload(); - - // // } - - // // loadIssues().then(() => setLoading(false)) - // // if(issues.length != 0){ - // setLoading(false); - // // } - // },[issues]) - return ( <>

Issues Result

- {/* {loading == true ? ( - - - - - - ) : ( - - issues.map(issue => { - return ( - - ) - }) - ) - } */} { - issues.map(issue => { + allIssues?.map(issue => { return ( ) @@ -69,7 +36,6 @@ export default function Search({allIssues}){ ) } -// pages/products/[id].js async function loadRepo(issueItems){ var repoObj = {};