Skip to content

Commit

Permalink
fix(prettier): update the code to match prettier code style
Browse files Browse the repository at this point in the history
  • Loading branch information
ReidyT committed Nov 6, 2023
1 parent 8f6a33e commit 148f5c2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
6 changes: 5 additions & 1 deletion src/constants/prefix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
export const BUILDER_ITEMS_PREFIX = '/items';
export const PLAYER_ITEMS_PREFIX = '';
export const LIBRARY_ITEMS_PREFIX = '/collections';
export const CLIENT_PREFIX = [BUILDER_ITEMS_PREFIX, PLAYER_ITEMS_PREFIX, LIBRARY_ITEMS_PREFIX];
export const CLIENT_PREFIX = [
BUILDER_ITEMS_PREFIX,
PLAYER_ITEMS_PREFIX,
LIBRARY_ITEMS_PREFIX,
];
26 changes: 13 additions & 13 deletions src/utils/shortLink.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { CLIENT_PREFIX, Context } from '@/constants';

export function getPlatformPrefix(shortLinkView: Context) {
const [BUILDER_PREFIX, PLAYER_PREFIX, LIBRARY_PREFIX] = CLIENT_PREFIX;
switch (shortLinkView) {
case Context.Builder:
return BUILDER_PREFIX;
case Context.Library:
return LIBRARY_PREFIX;
case Context.Player:
return PLAYER_PREFIX;
default:
throw new Error(`The given context '${shortLinkView}' is not valid`);
}
}
const [BUILDER_PREFIX, PLAYER_PREFIX, LIBRARY_PREFIX] = CLIENT_PREFIX;

switch (shortLinkView) {
case Context.Builder:
return BUILDER_PREFIX;
case Context.Library:
return LIBRARY_PREFIX;
case Context.Player:
return PLAYER_PREFIX;
default:
throw new Error(`The given context '${shortLinkView}' is not valid`);
}
}

0 comments on commit 148f5c2

Please sign in to comment.