feat: add collection views

This commit is contained in:
Steven
2023-11-12 10:47:49 +08:00
parent 626b0df21c
commit 83970d5d55
18 changed files with 887 additions and 83 deletions

View File

@ -0,0 +1,15 @@
import { Shortcut as ShortcutPb } from "@/types/proto/api/v2/shortcut_service";
export const convertShortcutFromPb = (shortcutMessage: ShortcutPb): Shortcut => {
return {
id: shortcutMessage.id,
creatorId: shortcutMessage.creatorId,
createdTs: shortcutMessage.createdTime?.getTime() || 0,
updatedTs: shortcutMessage.updatedTime?.getTime() || 0,
name: shortcutMessage.name,
link: shortcutMessage.link,
title: shortcutMessage.title,
description: shortcutMessage.description,
tags: shortcutMessage.tags,
} as Shortcut;
};