1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-22 13:04:19 +00:00

🚧 Partially fix a bug

This commit is contained in:
Stefano Pigozzi 2021-05-10 17:17:16 +02:00
parent 31b97ae6b9
commit 9c96e20d4a
Signed by untrusted user who does not match committer: steffo
GPG key ID: 6965406171929D01
3 changed files with 3 additions and 1 deletions

View file

@ -31,6 +31,7 @@ export default function BoxRepositoriesActive({ ...props }) {
if(repositories.length > 0) { if(repositories.length > 0) {
contents = repositories.map(repo => ( contents = repositories.map(repo => (
<RepositorySummaryBase <RepositorySummaryBase
key={repo["id"]}
{...repo} {...repo}
icon={faSearch} icon={faSearch}
canArchive={true} canArchive={true}

View file

@ -30,6 +30,7 @@ export default function BoxRepositoriesArchived({ ...props }) {
if(repositories.length > 0) { if(repositories.length > 0) {
contents = repositories.map(repo => ( contents = repositories.map(repo => (
<RepositorySummaryBase <RepositorySummaryBase
key={repo["id"]}
{...repo} {...repo}
icon={faSearch} icon={faSearch}
canArchive={true} canArchive={true}

View file

@ -31,7 +31,7 @@ export default function RepositorySummaryBase(
{ id, owner, icon, name, start, end, isActive, canDelete, canEdit, canArchive, className, ...props } { id, owner, icon, name, start, end, isActive, canDelete, canEdit, canArchive, className, ...props }
) { ) {
const {fetchDataAuth} = useContext(ContextUser) const {fetchDataAuth} = useContext(ContextUser)
const {history} = useHistory() const history = useHistory()
const {fetchNow: archiveThis} = useData(fetchDataAuth, "PATCH", `/api/v1/repositories/${id}`, {"close": true}) const {fetchNow: archiveThis} = useData(fetchDataAuth, "PATCH", `/api/v1/repositories/${id}`, {"close": true})
const {fetchNow: unarchiveThis} = useData(fetchDataAuth, "PATCH", `/api/v1/repositories/${id}`, {"open": true}) const {fetchNow: unarchiveThis} = useData(fetchDataAuth, "PATCH", `/api/v1/repositories/${id}`, {"open": true})
const {fetchNow: deletThis} = useData(fetchDataAuth, "DELETE", `/api/v1/repositories/${id}`) const {fetchNow: deletThis} = useData(fetchDataAuth, "DELETE", `/api/v1/repositories/${id}`)