Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#394 마이페이지에 알림 설정 추가 + Introduce @emotion/react #488

Merged
merged 22 commits into from
Apr 1, 2023

Conversation

14KGun
Copy link
Member

@14KGun 14KGun commented Mar 26, 2023

Summary

It closes #394 , #495

Screenshots

  • 알림 기능 설정 모달

    스크린샷 2023-04-02 오전 1 07 45
  • 디바이스 토큰을 백엔드에서 확인할 수 없을 때

    스크린샷 2023-04-02 오전 1 09 16

@14KGun 14KGun added the mypage 마이페이지 label Mar 26, 2023
@14KGun 14KGun self-assigned this Mar 26, 2023
@14KGun 14KGun linked an issue Mar 26, 2023 that may be closed by this pull request
@14KGun 14KGun linked an issue Mar 30, 2023 that may be closed by this pull request
2 tasks
@14KGun 14KGun changed the title #394 마이페이지에 알림 설정 추가 #394 마이페이지에 알림 설정 추가 + Introduce @emotion/react Mar 30, 2023
@@ -1,3 +1,4 @@
node_modules
build
.github
tsconfig.json
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tsconfig.json formatting은 typescript가 자동으로 해주더라고요.

Comment on lines +14 to +22
babel: {
presets: [
[
"@babel/preset-react",
{ runtime: "automatic", importSource: "@emotion/react" },
],
],
plugins: ["@emotion/babel-plugin"],
},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

css prop 에 대해서 babel 설정하였습니다.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

react-mobile-picker-mod는 과거에 사용한 모듈로 현재는 taxi-front에서 사용하지 않습니다.
해당 모듈의 type정의를 지웠습니다.

Comment on lines +1 to +10
import { atom } from "recoil";

export type deviceTokenType = Nullable<string>;

const deviceTokenAtom = atom<deviceTokenType>({
key: "deviceTokenAtom",
default: null,
});

export default deviceTokenAtom;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deviceToken 을 관리하기 위한 recoil state를 정의하였습니다.

Comment on lines +1 to +16
import { atom } from "recoil";

export type notificationOptionsType = {
advertisement: boolean;
beforeDepart: boolean;
chatting: boolean;
notice: boolean;
keywords: [string];
};

const notificationOptionsAtom = atom<Nullable<notificationOptionsType>>({
key: "notificationOptionsAtom",
default: null,
});

export default notificationOptionsAtom;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notificationOption(/notifications/options API 호출 결과) 을 관리하기 위한 recoil state를 정의하였습니다.

url: "/auth/registerDeviceToken",
method: "post",
data: { deviceToken: newDeviceToken },
onSuccess: () => setDeviceToken(newDeviceToken),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

device 토큰 등록을 taxi-back에 API를 통해 완료하면, global state를 업데이트 합니다.

Comment on lines +116 to +140
<NavigationMenu
text={t("home_for_nav", { ns: "home" })}
page="home"
path={pathname}
/>
<NavigationMenu
text={t("search_room_for_nav", { ns: "search" })}
page="search"
path={pathname}
/>
<NavigationMenu
text={t("add_room_for_nav", { ns: "addroom" })}
page="addroom"
path={pathname}
/>
<NavigationMenu
text={t("my_room_for_nav", { ns: "myroom" })}
page="myroom"
path={pathname}
/>
<NavigationMenu
text={t("my_page_for_nav", { ns: "mypage" })}
page="mypage"
path={pathname}
/>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Navigation 컴포넌트 i18n으로 영어 지원

@14KGun 14KGun marked this pull request as ready for review April 1, 2023 03:49
@14KGun 14KGun merged commit 2aaffe5 into dev Apr 1, 2023
@14KGun 14KGun deleted the #394-notification-setting branch April 1, 2023 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mypage 마이페이지
Projects
None yet
Development

Successfully merging this pull request may close these issues.

emotion 점진적 도입 마이 페이지 내 알림 설정 기능 추가
1 participant