rename ItemsPage to UserItemsPage
this is because I'm making ItemPage now lol
This commit is contained in:
parent
9143bacbe5
commit
76ad917843
2 changed files with 5 additions and 5 deletions
|
@ -11,9 +11,9 @@ import buildApolloClient from "./apolloClient";
|
||||||
import PageLayout from "./PageLayout";
|
import PageLayout from "./PageLayout";
|
||||||
import WardrobePageLayout from "./WardrobePage/WardrobePageLayout";
|
import WardrobePageLayout from "./WardrobePage/WardrobePageLayout";
|
||||||
|
|
||||||
const ItemsPage = loadable(() => import("./ItemsPage"));
|
|
||||||
const HomePage = loadable(() => import("./HomePage"));
|
const HomePage = loadable(() => import("./HomePage"));
|
||||||
const ModelingPage = loadable(() => import("./ModelingPage"));
|
const ModelingPage = loadable(() => import("./ModelingPage"));
|
||||||
|
const UserItemsPage = loadable(() => import("./UserItemsPage"));
|
||||||
const WardrobePage = loadable(() => import("./WardrobePage"), {
|
const WardrobePage = loadable(() => import("./WardrobePage"), {
|
||||||
fallback: <WardrobePageLayout />,
|
fallback: <WardrobePageLayout />,
|
||||||
});
|
});
|
||||||
|
@ -68,7 +68,7 @@ function App() {
|
||||||
</Route>
|
</Route>
|
||||||
<Route path="/user/:userId/items">
|
<Route path="/user/:userId/items">
|
||||||
<PageLayout>
|
<PageLayout>
|
||||||
<ItemsPage />
|
<UserItemsPage />
|
||||||
</PageLayout>
|
</PageLayout>
|
||||||
</Route>
|
</Route>
|
||||||
<Route path="/modeling">
|
<Route path="/modeling">
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { Box, Wrap } from "@chakra-ui/core";
|
import { Box } from "@chakra-ui/core";
|
||||||
import gql from "graphql-tag";
|
import gql from "graphql-tag";
|
||||||
import { useParams } from "react-router-dom";
|
import { useParams } from "react-router-dom";
|
||||||
import { useQuery } from "@apollo/client";
|
import { useQuery } from "@apollo/client";
|
||||||
|
@ -16,7 +16,7 @@ import ItemCard, {
|
||||||
} from "./components/ItemCard";
|
} from "./components/ItemCard";
|
||||||
import useCurrentUser from "./components/useCurrentUser";
|
import useCurrentUser from "./components/useCurrentUser";
|
||||||
|
|
||||||
function ItemsPage() {
|
function UserItemsPage() {
|
||||||
const { userId } = useParams();
|
const { userId } = useParams();
|
||||||
const currentUser = useCurrentUser();
|
const currentUser = useCurrentUser();
|
||||||
const isCurrentUser = currentUser.id === userId;
|
const isCurrentUser = currentUser.id === userId;
|
||||||
|
@ -139,4 +139,4 @@ function ItemsPage() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ItemsPage;
|
export default UserItemsPage;
|
Loading…
Reference in a new issue