diff --git a/src/app/App.js b/src/app/App.js index cdae1d6..951f9ed 100644 --- a/src/app/App.js +++ b/src/app/App.js @@ -34,7 +34,9 @@ const PrivacyPolicyPage = loadable(() => import("./PrivacyPolicyPage")); const SupportPetAppearancesPage = loadable(() => import("./SupportPetAppearancesPage") ); -const UserItemsPage = loadable(() => import("./UserItemsPage")); +const UserItemListsIndexPage = loadable(() => + import("./UserItemListsIndexPage") +); const UserItemListPage = loadable(() => import("./UserItemListPage")); const UserOutfitsPage = loadable(() => import("./UserOutfitsPage")); const WardrobePage = loadable(() => import("./WardrobePage"), { @@ -143,7 +145,7 @@ function App() { - + diff --git a/src/app/GlobalFooter.js b/src/app/GlobalFooter.js index a9be301..49497a5 100644 --- a/src/app/GlobalFooter.js +++ b/src/app/GlobalFooter.js @@ -112,7 +112,7 @@ function ColorModeButton() { function useClassicDTIUrl() { const itemPageMatch = useRouteMatch("/items/:itemId"); - const userItemsPageMatch = useRouteMatch("/user/:userId/lists"); + const userItemListsIndexPageMatch = useRouteMatch("/user/:userId/lists"); const modelingPageMatch = useRouteMatch("/modeling"); if (itemPageMatch) { @@ -120,8 +120,8 @@ function useClassicDTIUrl() { return `https://impress.openneo.net/items/${itemId}`; } - if (userItemsPageMatch) { - const { userId } = userItemsPageMatch.params; + if (userItemListsIndexPageMatch) { + const { userId } = userItemListsIndexPageMatch.params; return `https://impress.openneo.net/user/${userId}/closet`; } diff --git a/src/app/UserItemsPage.js b/src/app/UserItemListsIndexPage.js similarity index 98% rename from src/app/UserItemsPage.js rename to src/app/UserItemListsIndexPage.js index e8bbf08..a05d4c9 100644 --- a/src/app/UserItemsPage.js +++ b/src/app/UserItemListsIndexPage.js @@ -52,14 +52,14 @@ const BadgeButton = React.forwardRef((props, ref) => ( )); -function UserItemsPage() { +function UserItemListsIndexPage() { const { userId } = useParams(); const currentUser = useCurrentUser(); const isCurrentUser = currentUser.id === userId; const { loading, error, data } = useQuery( gql` - query UserItemsPage($userId: ID!) { + query UserItemListsIndexPage($userId: ID!) { user(id: $userId) { id username @@ -314,7 +314,7 @@ function UserSearchForm() { query UserSearchForm($name: String!) { userByName(name: $name) { id - # Consider preloading UserItemsPage fields here, too? + # Consider preloading UserItemListsIndexPage fields here, too? } } `, @@ -348,7 +348,7 @@ function UserSearchForm() { query UserSearchFormByEmail($email: String!, $supportSecret: String!) { userByEmail(email: $email, supportSecret: $supportSecret) { id - # Consider preloading UserItemsPage fields here, too? + # Consider preloading UserItemListsIndexPage fields here, too? } } `, @@ -724,4 +724,4 @@ function UserSupportMenu({ children, user }) { ); } -export default UserItemsPage; +export default UserItemListsIndexPage;