forked from rupali-codes/LinksHub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: clean up codebase and code organization (rupali-codes#1021)
- Loading branch information
1 parent
696bead
commit 706aa6a
Showing
89 changed files
with
1,633 additions
and
1,609 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
"singleQuote": true, | ||
"tabWidth": 2, | ||
"useTabs": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,43 @@ | ||
|
||
# Security Policy | ||
|
||
|
||
|
||
|
||
## Introduction | ||
|
||
This document outlines the security policy for the [Linkshub](https://linkshub.vercel.app/) open source project that provides links to websites for courses across the internet. The policy is intended to provide guidelines and procedures for reporting, triaging, and addressing security vulnerabilities in the project. | ||
|
||
## Scope | ||
|
||
The security policy covers the codebase and documentation of the open source project, as well as the external links to websites for courses. | ||
|
||
## Vulnerability Disclosure Process | ||
|
||
The project will provide a dedicated email address (rupali7487@gmail.com) for submitting vulnerability reports related to the [Linkshub](https://linkshub.vercel.app/) website or any of the linked websites. Vulnerability reports will be reviewed and triaged by the project's maintainers. The owner will aim to respond to vulnerability reports within 72 hours, and will provide regular updates on the status of the vulnerability and any remediation efforts. | ||
|
||
## Roles and Responsibilities | ||
|
||
The maintainers are responsible for handling vulnerability reports and making decisions about how to address them. They will also work with contributors and external website owners to resolve the issue(s) as quickly as possible. | ||
|
||
|
||
|
||
## Response Timeline | ||
|
||
LinksHub will aim to resolve critical vulnerabilities within 30 days and non-critical vulnerabilities within 90 days. These deadlines may extend if additional time is needed to address the issue(s). | ||
|
||
|
||
## Secure Coding Practices | ||
## Secure Coding Practices | ||
|
||
LinksHub will provide guidance on secure coding practices for contributors, including guidelines for input validation, authentication, authorization, and data protection. | ||
|
||
## Regular Review and Update | ||
|
||
The security policy will be regularly reviewed and updated to ensure that it remains effective and relevant. The maintainers will evaluate the vulnerability disclosure process, update secure coding guidelines, and revise the response timeline as needed. | ||
|
||
## Disclosure Policy | ||
|
||
LinksHub will follow a coordinated disclosure policy, which means that vulnerabilities will be disclosed publicly only after they have been remediated. The project may work with external website owners to coordinate disclosure of vulnerabilities that affect their websites. | ||
|
||
|
||
## Legal Disclaimer | ||
|
||
The security policy includes a legal disclaimer that limits the liability of the project maintainers and contributors for any security vulnerabilities or incidents that occur as a result of using[Linkshub's](https://linkshub.vercel.app/) website or any of the linked sources. | ||
|
||
|
||
## Contact Information | ||
|
||
If you have any questions or concerns about the security policy or any security vulnerabilities in the project, please contact us at _linkshub.opensource@gmail.com_. | ||
|
||
|
||
By implementing this security policy, we aim to ensure that vulnerabilities are addressed in a timely manner, and that users and contributors can use [Linkshub](https://linkshub.vercel.app/) and its linked sources safely and securely. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export const SCROLL_LIMIT = 200; | ||
export const SCROLL_LIMIT = 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { FC } from "react"; | ||
import { SideNavbarBody } from "components/SideNavbar/SideNavbarBody"; | ||
import { FC } from 'react' | ||
import { SideNavbarBody } from 'components/SideNavbar/SideNavbarBody' | ||
|
||
export const Aside: FC<{}> = () => { | ||
return ( | ||
<aside className="fixed top-[76px] left-0 z-[20] hidden h-screen w-[290px] lg:block"> | ||
<SideNavbarBody /> | ||
</aside> | ||
); | ||
}; | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { BackToTopButton } from "./BackToTopButton"; | ||
export { BackToTopButton } from './BackToTopButton' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
import { FC } from "react"; | ||
import { createPortal } from "react-dom"; | ||
import { FC } from 'react' | ||
import { createPortal } from 'react-dom' | ||
|
||
export const Backdrop: FC<{ onClick: (() => void) | undefined, className?: string | undefined }> = (props) => { | ||
const { onClick, className } = props; | ||
export const Backdrop: FC<{ | ||
onClick: (() => void) | undefined | ||
className?: string | undefined | ||
}> = (props) => { | ||
const { onClick, className } = props | ||
|
||
return createPortal( | ||
<div | ||
<div | ||
className={`fixed inset-0 z-50 h-full w-full cursor-pointer bg-black/80 ${className}`} | ||
onClick={onClick} | ||
></div>, | ||
document.getElementById('backdrop-root')! | ||
); | ||
}; | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,44 @@ | ||
import { FC, useState } from "react"; | ||
import { BackToTopButton } from "../BackToTop/BackToTopButton"; | ||
import Popup from "components/popup"; | ||
import CardsListItem from "./CardsListItem"; | ||
import type { IData } from "types"; | ||
import { FC, useState } from 'react' | ||
import { BackToTopButton } from '../BackToTop/BackToTopButton' | ||
import Popup from 'components/popup' | ||
import CardsListItem from './CardsListItem' | ||
import type { IData } from 'types' | ||
|
||
const CardsList:FC<{ cards: IData[] }> = (props) => { | ||
const { cards } = props; | ||
const [currentCard, setCurrentCard] = useState<IData | null>(null); | ||
const CardsList: FC<{ cards: IData[] }> = (props) => { | ||
const { cards } = props | ||
const [currentCard, setCurrentCard] = useState<IData | null>(null) | ||
|
||
const getCardId = (item: IData | null) => { | ||
setCurrentCard(item); | ||
}; | ||
setCurrentCard(item) | ||
} | ||
|
||
const removeCurrentCard = () => { | ||
setCurrentCard(null); | ||
setCurrentCard(null) | ||
} | ||
|
||
cards.sort((a: IData, b: IData) => { | ||
if (a.name < b.name) return -1; | ||
if (a.name > b.name) return 1; | ||
return 0; | ||
}); | ||
if (a.name < b.name) return -1 | ||
if (a.name > b.name) return 1 | ||
return 0 | ||
}) | ||
|
||
return ( | ||
<> | ||
<ul className={`flex w-full w-full flex-wrap content-start gap-4 md:flex-row`}> | ||
<ul | ||
className={`flex w-full w-full flex-wrap content-start gap-4 md:flex-row`} | ||
> | ||
{cards.map((data: IData) => ( | ||
<CardsListItem | ||
<CardsListItem | ||
key={data.id} | ||
data={data} | ||
onClick={() => getCardId(data)} | ||
data={data} | ||
onClick={() => getCardId(data)} | ||
/> | ||
))} | ||
</ul> | ||
<BackToTopButton /> | ||
<Popup | ||
currentCard={currentCard} | ||
onClose={removeCurrentCard} | ||
/> | ||
<Popup currentCard={currentCard} onClose={removeCurrentCard} /> | ||
</> | ||
); | ||
}; | ||
) | ||
} | ||
|
||
export default CardsList; | ||
export default CardsList |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
import { Footer } from './Footer' | ||
import { Footer } from './Footer' |
Oops, something went wrong.