mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 04:17:23 +00:00
Update collection title.
This commit is contained in:
@@ -51,6 +51,11 @@ export default function CollectionPage() {
|
||||
});
|
||||
}, [id]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!collection) return;
|
||||
document.title = collection.title;
|
||||
}, [collection])
|
||||
|
||||
const toBeDeletedRID = useRef<number | null>(null);
|
||||
|
||||
const handleDeleteResource = (resourceId: number) => {
|
||||
|
@@ -139,7 +139,7 @@ func serveIndexHtml(c fiber.Ctx) error {
|
||||
if err == nil {
|
||||
coll, err := service.GetCollectionByID(uint(collectionID))
|
||||
if err == nil {
|
||||
title = "Collection: " + coll.Title
|
||||
title = coll.Title
|
||||
description = utils.ArticleToDescription(coll.Article, 256)
|
||||
if len(coll.Images) > 0 {
|
||||
preview = fmt.Sprintf("%s/api/image/%d", serverBaseURL, coll.Images[0].ID)
|
||||
|
Reference in New Issue
Block a user