mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-06 21:22:36 +00:00
feat: add collection views
This commit is contained in:
15
frontend/web/src/utils/shortcut.ts
Normal file
15
frontend/web/src/utils/shortcut.ts
Normal 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;
|
||||
};
|
Reference in New Issue
Block a user