Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: fix breadcrumbs #2249

Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions components/TopBar/CategoryDescriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,11 @@ const categoryDescriptions: CategoryDescriptions = {
'"Ethers" generally refers to both the native cryptocurrency of the Ethereum network and a popular JavaScript library used for interacting with the Ethereum blockchain.',

//cloud computing
aws: 'AWS, Amazon\'s cloud computing platform, provides scalable and reliable services, including computing power, storage, and machine learning. Trusted by millions, AWS enables businesses to innovate and transform digitally with efficiency.',
gcp: 'Google Cloud is a prominent cloud computing platform offering a range of services, from computing and storage to advanced AI solutions. Trusted by businesses, it facilitates innovation and scalability.',
azure: 'Microsoft Cloud, known as Azure, is a comprehensive cloud computing platform. With diverse services, including computing, storage, and AI, Azure empowers businesses to thrive in the digital landscape.',
oracle: 'Oracle Cloud is a leading cloud computing platform providing a robust suite of services. From databases to advanced solutions, Oracle Cloud supports businesses in achieving scalability, security, and innovation.',
ibm: 'IBM Cloud stands as a formidable cloud computing platform, offering a wide array of services. From computing power to advanced technologies, IBM Cloud supports businesses in their digital transformation journey.',
'aws-cloud': 'AWS, Amazon\'s cloud computing platform, provides scalable and reliable services, including computing power, storage, and machine learning. Trusted by millions, AWS enables businesses to innovate and transform digitally with efficiency.',
'google-cloud': 'Google Cloud is a prominent cloud computing platform offering a range of services, from computing and storage to advanced AI solutions. Trusted by businesses, it facilitates innovation and scalability.',
'microsoft-cloud': 'Microsoft Cloud, known as Azure, is a comprehensive cloud computing platform. With diverse services, including computing, storage, and AI, Azure empowers businesses to thrive in the digital landscape.',
'oracle-cloud': 'Oracle Cloud is a leading cloud computing platform providing a robust suite of services. From databases to advanced solutions, Oracle Cloud supports businesses in achieving scalability, security, and innovation.',
'ibm-cloud': 'IBM Cloud stands as a formidable cloud computing platform, offering a wide array of services. From computing power to advanced technologies, IBM Cloud supports businesses in their digital transformation journey.',

//internet of things
coursera: 'Coursera is an online learning platform that offers a wide range of courses, specializations, and degrees from top universities and organizations globally. It provides accessible and flexible education to individuals seeking to enhance their skills and knowledge.',
Expand Down
8 changes: 4 additions & 4 deletions components/TopBar/TopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export const TopBar: FC<TopBarProps> = ({}) => {

const category = router.asPath
const categoryName = category?.split('/')[1]?.split('-').join(' ')
const subcategoryName = category?.split('/')[2]?.split('-').join(' ')
const subCategoryKeyName = category?.split('/')[2]
const subcategoryName = subCategoryKeyName?.split('-').join(' ')

const searchQuery = router.query.query?.toString() || ''

Expand All @@ -36,10 +37,9 @@ export const TopBar: FC<TopBarProps> = ({}) => {
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
.join(' ')
}

const description = categoryDescriptions[searchQuery || subcategoryName] || ''
const description =
categoryDescriptions[searchQuery || subCategoryKeyName] || ''
const isResourceSelected = isValidResource(searchQuery || subcategoryName)

if (router.pathname.length === 1) return null
return isResourceSelected ? (
<div
Expand Down
4 changes: 2 additions & 2 deletions database/cloud_computing_platforms/aws.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"description": "Gain free, hands-on experience with the AWS platform, products, and services. AWS Activate provides eligible startups with a host of resources, including free AWS credits to spend on AWS services, and AWS Support. ",
"url": "https://docs.aws.amazon.com/index.html",
"category": "cloud-computing",
"subcategory": "aws"
"subcategory": "aws-cloud"
},
{
"name": "AWS tutorial for beginners",
"description": "Learn AWS from basic-to-advanced level. This playlist has short and great tutorials that will help you learn AWS.",
"url": "https://www.youtube.com/playlist?list=PL6XT0grm_TfgtwtwUit305qS-HhDvb4du",
"category": "cloud-computing",
"subcategory": "aws",
"subcategory": "aws-cloud",
"language": "hindi"
}
]
4 changes: 2 additions & 2 deletions database/cloud_computing_platforms/azure.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"description": "Learn how to build and manage powerful applications using Microsoft Azure cloud services. Get documentation, example code, tutorials, and more.",
"url": "https://learn.microsoft.com/en-us/azure/?product=popular",
"category": "cloud-computing",
"subcategory": "azure"
"subcategory": "microsoft-cloud"
},
{
"name": "Microsoft Learn & Certified",
"description": "Microsoft has certification paths for many technical job roles. Each of these certifications consists of passing a series of exams to earn them. ",
"url": "https://learn.microsoft.com/en-us/certifications/",
"category": "cloud-computing",
"subcategory": "azure"
"subcategory": "microsoft-cloud"
}
]
2 changes: 1 addition & 1 deletion database/cloud_computing_platforms/gcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"description": "Find guides, code samples, architectural diagrams, best practices, tutorials, API references, and more to learn how to build on Google Cloud.",
"url": "https://cloud.google.com/docs/",
"category": "cloud-computing",
"subcategory": "gcp"
"subcategory": "google-cloud"
}
]
2 changes: 1 addition & 1 deletion database/cloud_computing_platforms/ibm.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"description": "The IBM Cloud platform is composed of multiple components that work together to provide a consistent and dependable cloud experience.",
"url": "https://cloud.ibm.com/docs",
"category": "cloud-computing",
"subcategory": "ibm"
"subcategory": "ibm-cloud"
}
]
4 changes: 2 additions & 2 deletions database/cloud_computing_platforms/oracle.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"description": "Looking for comprehensive documentation, tutorials, or videos so you can learn about Oracle Cloud Services? You can find all of these resources here in the Oracle Help Center.",
"url": "https://docs.oracle.com/en/cloud/get-started/index.html",
"category": "cloud-computing",
"subcategory": "oracle"
"subcategory": "oracle-cloud"
aftabrehan marked this conversation as resolved.
Show resolved Hide resolved
},
{
"name": "OCI certifications",
"description": "Accelerate your cloud journey along with free certification from Oracle",
"url": "https://education.oracle.com/home",
"category": "cloud-computing",
"subcategory": "oracle"
"subcategory": "oracle-cloud"
}
]
10 changes: 5 additions & 5 deletions database/data.ts
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, can you please follow the same naming convention for each subcategory? like for nlp make it natural-language-processing and so on

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sanjeevkumar321, If you need any help, feel free to let us know.

Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,15 @@ export const sidebarData: ISidebar[] = [
{
category: 'cloud-computing',
subcategory: [
{ name: 'google cloud', url: '/gcp', resources: DB.gcp },
{ name: 'google cloud', url: '/google-cloud', resources: DB.gcp },
{
name: 'AWS cloud',
url: '/aws',
url: '/aws-cloud',
resources: DB.aws,
},
{ name: 'Microsoft cloud', url: '/azure', resources: DB.azure },
{ name: 'Oracle cloud', url: '/oracle', resources: DB.oracle },
{ name: 'IBM cloud', url: '/ibm', resources: DB.ibm },
{ name: 'Microsoft cloud', url: '/microsoft-cloud', resources: DB.azure },
{ name: 'Oracle cloud', url: '/oracle-cloud', resources: DB.oracle },
{ name: 'IBM cloud', url: '/ibm-cloud', resources: DB.ibm },
],
},
{
Expand Down
2 changes: 1 addition & 1 deletion pages/[category]/[...subcategory].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const SubCategory: NextPage<PageProps> = ({ subcategory }) => {
const title = `LinksHub - ${
pageCategory[0].toUpperCase() + pageCategory.slice(1)
}`
const numberOfCards = filterDB[0].length
const numberOfCards = filterDB[0]?.length
const { totalPages, currentPage, startIndex, endIndex, handlePageChange } =
usePagination(filterDB.length ? filterDB[0].length : 0)
let content: JSX.Element[] | JSX.Element
Expand Down