generated from graasp/graasp-repo
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(prettier): update the code to match prettier code style
- Loading branch information
Showing
2 changed files
with
18 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`); | ||
} | ||
} |