Rename UserItemsPage
For consistency with what we're calling it, and with `UserItemListPage`!
This commit is contained in:
parent
f8748a2bcd
commit
faf8364aab
3 changed files with 12 additions and 10 deletions
|
@ -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() {
|
|||
</Route>
|
||||
<Route path="/user/:userId/lists">
|
||||
<PageLayout>
|
||||
<UserItemsPage />
|
||||
<UserItemListsIndexPage />
|
||||
</PageLayout>
|
||||
</Route>
|
||||
<Route path="/your-outfits">
|
||||
|
|
|
@ -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`;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,14 +52,14 @@ const BadgeButton = React.forwardRef((props, ref) => (
|
|||
<Badge as="button" ref={ref} {...props} />
|
||||
));
|
||||
|
||||
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;
|
Loading…
Reference in a new issue