Skip to content

Commit

Permalink
Rename user redux slice
Browse files Browse the repository at this point in the history
  • Loading branch information
WooWan committed Oct 15, 2022
1 parent c6e6c3e commit 6afaf7b
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion components/comment/comment/Comment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useRouter } from "next/router";
import { useState } from "react";
import { useSelector } from "react-redux";
import { ICommentResponse } from "../../../interfaces";
import { selectUser } from "../../../store/slices/user";
import { selectUser } from "../../../store/slices/user/user";
import { useDeleteComment } from "../../../utils/comment";
import { ContentFont, TitleFont } from "../../core/font/TitleFonts";
import CommentRegister from "../register/Register";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Header, LoginBox, Navigator } from "./NavigationHeader.style";
import Link from "next/link";
import { useAxiosInterceptor } from "../../../utils/hooks/useAxiosInterceptor";
import { useDispatch, useSelector } from "react-redux";
import { logoutUser, selectUser } from "../../../store/slices/user";
import { logoutUser, selectUser } from "../../../store/slices/user/user";
import { openModal } from "../../../store/slices/Modal";
import { useRouter } from "next/router";
import { TitleFont } from "../../core/font/TitleFonts";
Expand Down
2 changes: 1 addition & 1 deletion components/core/layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import ModalManager from "../../modal/modal/Modal";
import { loginMember } from "../../../api/member";
import { useCookies } from "react-cookie";
import { useRouter } from "next/router";
import { loginUser, selectUser } from "../../../store/slices/user";
import { loginUser, selectUser } from "../../../store/slices/user/user";

interface LayoutProps {
children: ReactNode;
Expand Down
2 changes: 1 addition & 1 deletion components/post/Post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Link from "next/link";
import { useRouter } from "next/router";
import { useSelector } from "react-redux";
import { IPost } from "../../interfaces";
import { selectUser } from "../../store/slices/user";
import { selectUser } from "../../store/slices/user/user";

import { useDeletePost } from "../../utils/posts";
import { Button } from "../comment/comment/Comment.style";
Expand Down
2 changes: 1 addition & 1 deletion components/ratings/user-rating.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import styled from "styled-components";
import { openModal } from "../../store/slices/Modal";
import { selectUser } from "../../store/slices/user";
import { selectUser } from "../../store/slices/user/user";
import {
GeneralRating,
RatingInfo,
Expand Down
2 changes: 1 addition & 1 deletion components/review/review-register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useAddReview } from "../../api/theme";
import { useRouter } from "next/router";
import TextButton from "../core/button/text-button/TextButton";
import { useDispatch, useSelector } from "react-redux";
import { selectUser } from "../../store/slices/user";
import { selectUser } from "../../store/slices/user/user";
import useValidateUser from "../../utils/useValidateUser";
import { openModal } from "../../store/slices/Modal";

Expand Down
2 changes: 1 addition & 1 deletion pages/theme/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import ReviewRegister from "../../components/review/review-register";
import Reviews from "../../components/review/Reviews";
import { IMemberRating, IThemeDetail } from "../../interfaces/theme";
import { useSelector } from "react-redux";
import { selectUser } from "../../store/slices/user";
import { selectUser } from "../../store/slices/user/user";

const Container = styled.div`
display: flex;
Expand Down
4 changes: 2 additions & 2 deletions store/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { configureStore } from "@reduxjs/toolkit";
import userReducer from "./slices/user";
import modalReducer, { modalSlice } from "./slices/Modal";
import userReducer from "./slices/user/user";
import modalReducer from "./slices/Modal";

export const store = configureStore({
reducer: {
Expand Down
2 changes: 1 addition & 1 deletion store/slices/Modal.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RootState } from "./../config";
import { RootState } from "../config";
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
import { Modals } from "../../components/modal/modal/Modal";

Expand Down
2 changes: 1 addition & 1 deletion utils/useValidateUser.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useDispatch, useSelector } from "react-redux";
import { openModal } from "../store/slices/Modal";
import { selectUser } from "../store/slices/user";
import { selectUser } from "../store/slices/user/user";

function useValidateUser() {
const { user, isLogin } = useSelector(selectUser);
Expand Down

0 comments on commit 6afaf7b

Please sign in to comment.