From 03881316c110e0138fd39d3dfd802cf91decb234 Mon Sep 17 00:00:00 2001 From: Jordan Phillips Date: Tue, 16 Apr 2024 21:08:58 +1000 Subject: [PATCH] refactor(recipes): rename profiles page and routes to recipes (#26) --- app/src/app/(dashboard)/{profiles => recipes}/page.tsx | 6 +++--- app/src/components/layouts/dashboard/sidebar/Sidebar.tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) rename app/src/app/(dashboard)/{profiles => recipes}/page.tsx (84%) diff --git a/app/src/app/(dashboard)/profiles/page.tsx b/app/src/app/(dashboard)/recipes/page.tsx similarity index 84% rename from app/src/app/(dashboard)/profiles/page.tsx rename to app/src/app/(dashboard)/recipes/page.tsx index 2ec1cf79..8565f581 100644 --- a/app/src/app/(dashboard)/profiles/page.tsx +++ b/app/src/app/(dashboard)/recipes/page.tsx @@ -1,6 +1,6 @@ 'use client' -import type { page_ProfilesPageQuery } from '@/__generated__/page_ProfilesPageQuery.graphql' +import type { page_RecipesPageQuery } from '@/__generated__/page_RecipesPageQuery.graphql' import { Button, Card, Typography } from '@giantnodes/react' import React, { Suspense } from 'react' @@ -9,13 +9,13 @@ import { graphql, useLazyLoadQuery } from 'react-relay' import { RecipeDialog, RecipeTable } from '@/components/interfaces/recipes' const QUERY = graphql` - query page_ProfilesPageQuery($first: Int, $after: String, $order: [RecipeSortInput!]) { + query page_RecipesPageQuery($first: Int, $after: String, $order: [RecipeSortInput!]) { ...RecipeTableFragment @arguments(first: $first, after: $after, order: $order) } ` const RecipeListPage: React.FC = () => { - const query = useLazyLoadQuery(QUERY, { + const query = useLazyLoadQuery(QUERY, { first: 25, order: [{ name: 'ASC' }], }) diff --git a/app/src/components/layouts/dashboard/sidebar/Sidebar.tsx b/app/src/components/layouts/dashboard/sidebar/Sidebar.tsx index 2a999269..537920bd 100644 --- a/app/src/components/layouts/dashboard/sidebar/Sidebar.tsx +++ b/app/src/components/layouts/dashboard/sidebar/Sidebar.tsx @@ -51,8 +51,8 @@ const Sidebar: React.FC = ({ $key, ...rest }) => { - - + + Recipes