mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
sing create-react-app now
This commit is contained in:
parent
332d09e3bd
commit
a9c43e8976
41 changed files with 6207 additions and 15613 deletions
|
@ -2,11 +2,11 @@ import { IComment, INode } from '~/redux/types';
|
|||
import { ISocialProvider } from '~/redux/auth/types';
|
||||
|
||||
export const API = {
|
||||
BASE: process.env.API_HOST,
|
||||
BASE: process.env.REACT_APP_API_HOST,
|
||||
USER: {
|
||||
LOGIN: '/user/login',
|
||||
OAUTH_WINDOW: (provider: ISocialProvider) =>
|
||||
`${process.env.API_HOST}oauth/${provider}/redirect`,
|
||||
`${process.env.RACT_APP_API_HOST}oauth/${provider}/redirect`,
|
||||
ME: '/user/',
|
||||
PROFILE: (username: string) => `/user/user/${username}/profile`,
|
||||
MESSAGES: (username: string) => `/user/user/${username}/messages`,
|
||||
|
|
|
@ -39,5 +39,5 @@ export const PHRASES = {
|
|||
],
|
||||
};
|
||||
|
||||
export const getRandomPhrase = (key: keyof typeof PHRASES) =>
|
||||
export const useRandomPhrase = (key: keyof typeof PHRASES) =>
|
||||
useMemo(() => PHRASES[key][Math.floor(Math.random() * PHRASES[key].length)], []);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue