Skip to content
This repository was archived by the owner on May 4, 2023. It is now read-only.

Commit 0bc86ca

Browse files
chore: updated snippet/cookbook url utils
1 parent 4fb5cc9 commit 0bc86ca

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

src/renderer/utils/urlUtils.ts

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,11 @@
11
import { APP_URL } from '../lib/config';
2-
import { PageTypes } from '../types/pageTypes';
32

4-
export const getCookbookUrl = (
5-
page: PageTypes,
6-
id: number,
7-
groupId?: number
8-
) => {
9-
return `${APP_URL}${
10-
page === 'team'
11-
? `/assistant/group-sharing/${groupId}/cookbook/${id}/view`
12-
: `/assistant/cookbook/${id}/view`
13-
}`;
3+
export const getCookbookUrl = (id: number) => {
4+
return `${APP_URL}/assistant/cookbook/${id}/view`;
145
};
156

16-
export const getSnippetUrl = (
17-
page: PageTypes,
18-
id: number,
19-
groupId?: number
20-
) => {
21-
return `${APP_URL}${
22-
page === 'team'
23-
? `/assistant/group-sharing/${groupId}/snippet/${id}/view`
24-
: `/assistant/snippet/${id}/view`
25-
}`;
7+
export const getSnippetUrl = (id: number) => {
8+
return `${APP_URL}/assistant/snippet/${id}/view`;
269
};
2710

2811
export const getUserUrl = (slug: string) => {

0 commit comments

Comments
 (0)