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
export const changingLanguageAction = | |
(language:'en'|'zh'): ThunkAction< | |
void, | |
LanguageState, | |
unknown, | |
LanguageActionTypes | |
> => | |
async (dispatch,getState) => { | |
i18n.changeLanguage(language); | |
dispatch(changeLanguageAction(language)); |
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
context('# [修改使用者權限] for normal admin', () => { | |
before(() => { | |
// 製作假資料 | |
// 本 context 會用這筆資料進行測試 | |
this.UserMock = createModelMock('User', { | |
id: 1, | |
email: '[email protected]', | |
name: 'admin', | |
isAdmin: true, // 是管理者 | |
}) |
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
import { HeroProps } from "@/types/HeroProps"; | |
export const Hero = ({ race,name }: HeroProps) => { | |
return ( | |
<h1>Hero: {name} is {race}</h1> | |
); | |
}; |
OlderNewer