mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-25 16:00:51 +01:00
Search Display Error
Added an additional check so the site renders despite description being undefined Co-authored-by: Konstantin Schaper<konstantin.schaper@cloudogu.com>
This commit is contained in:
2
gradle/changelog/search_display_error.yaml
Normal file
2
gradle/changelog/search_display_error.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
- type: fixed
|
||||
description: Display error when the description of a repository is not stored
|
||||
@@ -25,12 +25,12 @@
|
||||
import React, { FC } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import {
|
||||
useDateHitFieldValue,
|
||||
useStringHitFieldValue,
|
||||
DateFromNow,
|
||||
HitProps,
|
||||
RepositoryAvatar,
|
||||
TextHitField,
|
||||
HitProps,
|
||||
useDateHitFieldValue,
|
||||
useStringHitFieldValue,
|
||||
} from "@scm-manager/ui-components";
|
||||
import { CardList } from "@scm-manager/ui-layout";
|
||||
import classNames from "classnames";
|
||||
@@ -74,11 +74,11 @@ const RepositoryHit: FC<HitProps> = ({ hit }) => {
|
||||
</StyledLink>
|
||||
</CardList.Card.Title>
|
||||
</CardList.Card.Row>
|
||||
{((description as ValueHitField).value || (description as HighlightedHitField).fragments) && (
|
||||
{description && ((description as ValueHitField).value || (description as HighlightedHitField).fragments) ? (
|
||||
<CardList.Card.Row className="is-size-7 has-text-secondary">
|
||||
<TextHitField hit={hit} field="description" />
|
||||
</CardList.Card.Row>
|
||||
)}
|
||||
) : null}
|
||||
<CardList.Card.Row className="is-size-7 has-text-secondary">
|
||||
<DateFromNow date={date} />
|
||||
</CardList.Card.Row>
|
||||
|
||||
Reference in New Issue
Block a user