Skip to content

Dashboard: Move project pages inside (sidebar) layout #7144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/dashboard/src/@3rdweb-sdk/react/hooks/useEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import type { EngineBackendWalletType } from "lib/engine";
import { useState } from "react";
import { useActiveAccount } from "thirdweb/react";
import invariant from "tiny-invariant";
import type { ResultItem } from "../../../app/(app)/team/[team_slug]/[project_slug]/engine/dedicated/(instance)/[engineId]/metrics/components/StatusCodes";
import type { EngineStatus } from "../../../app/(app)/team/[team_slug]/[project_slug]/engine/dedicated/(instance)/[engineId]/overview/components/transactions-table";
import type { ResultItem } from "../../../app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/metrics/components/StatusCodes";
import type { EngineStatus } from "../../../app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/transactions-table";
import { engineKeys } from "../cache-keys";

// Engine instances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { usePathname } from "next/navigation";
import { useState } from "react";
import { toast } from "sonner";
import type { Chain, ThirdwebClient } from "thirdweb";
import { useAddContractToProject } from "../../../../../team/[team_slug]/[project_slug]/hooks/project-contracts";
import { useAddContractToProject } from "../../../../../team/[team_slug]/[project_slug]/(sidebar)/hooks/project-contracts";

const TRACKING_CATEGORY = "add_to_dashboard_upsell";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Meta, StoryObj } from "@storybook/react";
import { storybookThirdwebClient } from "stories/utils";
import { ConnectButton, ThirdwebProvider } from "thirdweb/react";
import { storybookThirdwebClient } from "../../../../../../../stories/utils";
import { CreateTokenAssetPageUI } from "./create-token-page.client";

const meta = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
DistributionBarChart,
type Segment,
} from "@/components/blocks/distribution-chart";
import { Form } from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import type { ThirdwebClient } from "thirdweb";
import { Form } from "../../../../../../../../@/components/ui/form";
import { StepCard } from "../create-token-card";
import type {
TokenDistributionForm,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import { redirect } from "next/navigation";
import {
getAuthToken,
getAuthTokenWalletAddress,
} from "../../../../../api/lib/getAuthToken";
import { loginRedirect } from "../../../../../login/loginRedirect";
} from "../../../../../../api/lib/getAuthToken";
import { loginRedirect } from "../../../../../../login/loginRedirect";
import { CreateTokenAssetPage } from "./create-token-page-impl";

export default async function Page(props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { getClientThirdwebClient } from "@/constants/thirdweb-client.client";
import { redirect } from "next/navigation";
import { Suspense } from "react";
import type { ThirdwebClient } from "thirdweb";
import { ClientOnly } from "../../../../../../components/ClientOnly/ClientOnly";
import { ContractTable } from "../../../../../../components/contract-components/tables/contract-table";
import { getSortedDeployedContracts } from "../../../../account/contracts/_components/getSortedDeployedContracts";
import { getAuthToken } from "../../../../api/lib/getAuthToken";
import { loginRedirect } from "../../../../login/loginRedirect";
import { ClientOnly } from "../../../../../../../components/ClientOnly/ClientOnly";
import { ContractTable } from "../../../../../../../components/contract-components/tables/contract-table";
import { getSortedDeployedContracts } from "../../../../../account/contracts/_components/getSortedDeployedContracts";
import { getAuthToken } from "../../../../../api/lib/getAuthToken";
import { loginRedirect } from "../../../../../login/loginRedirect";
import { Cards } from "./cards";

export default async function Page(props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import {
CircleAlertIcon,
ExternalLinkIcon,
} from "lucide-react";
import { ContractIcon } from "../../../../../(dashboard)/(chain)/components/server/icons/ContractIcon";
import { EngineIcon } from "../../../../../(dashboard)/(chain)/components/server/icons/EngineIcon";
import { InsightIcon } from "../../../../../(dashboard)/(chain)/components/server/icons/InsightIcon";
import { NebulaIcon } from "../../../../../../nebula-app/(app)/icons/NebulaIcon";
import { ContractIcon } from "../../../../../../(dashboard)/(chain)/components/server/icons/ContractIcon";
import { EngineIcon } from "../../../../../../(dashboard)/(chain)/components/server/icons/EngineIcon";
import { InsightIcon } from "../../../../../../(dashboard)/(chain)/components/server/icons/InsightIcon";
import { NebulaIcon } from "../../../../../../../nebula-app/(app)/icons/NebulaIcon";
import { ClientIDSection } from "./ClientIDSection";
import { IntegrateAPIKeyCodeTabs } from "./IntegrateAPIKeyCodeTabs";
import { SecretKeySection } from "./SecretKeySection";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client";
import { FullWidthSidebarLayout } from "@/components/blocks/SidebarLayout";
import { Badge } from "@/components/ui/badge";
import {
BookTextIcon,
BoxIcon,
Expand All @@ -8,13 +9,12 @@ import {
SettingsIcon,
WalletIcon,
} from "lucide-react";
import { ContractIcon } from "../../../../(dashboard)/(chain)/components/server/icons/ContractIcon";
import { EngineIcon } from "../../../../(dashboard)/(chain)/components/server/icons/EngineIcon";
import { InsightIcon } from "../../../../(dashboard)/(chain)/components/server/icons/InsightIcon";
import { PayIcon } from "../../../../(dashboard)/(chain)/components/server/icons/PayIcon";
import { SmartAccountIcon } from "../../../../(dashboard)/(chain)/components/server/icons/SmartAccountIcon";
import { Badge } from "../../../../../../@/components/ui/badge";
import { NebulaIcon } from "../../../../../nebula-app/(app)/icons/NebulaIcon";
import { ContractIcon } from "../../../../../(dashboard)/(chain)/components/server/icons/ContractIcon";
import { EngineIcon } from "../../../../../(dashboard)/(chain)/components/server/icons/EngineIcon";
import { InsightIcon } from "../../../../../(dashboard)/(chain)/components/server/icons/InsightIcon";
import { PayIcon } from "../../../../../(dashboard)/(chain)/components/server/icons/PayIcon";
import { SmartAccountIcon } from "../../../../../(dashboard)/(chain)/components/server/icons/SmartAccountIcon";
import { NebulaIcon } from "../../../../../../nebula-app/(app)/icons/NebulaIcon";

export function ProjectSidebarLayout(props: {
layoutPath: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
XAxis,
} from "recharts";
import type { RpcMethodStats } from "types/analytics";
import { EmptyStateCard } from "../../../../components/Analytics/EmptyStateCard";
import { EmptyStateCard } from "../../../../../components/Analytics/EmptyStateCard";

export function RpcMethodBarChartCardUI({
rawData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { fetchDashboardContractMetadata } from "@3rdweb-sdk/react/hooks/useDashb
import { type ThirdwebClient, defineChain, getContract } from "thirdweb";
import { getChainMetadata } from "thirdweb/chains";
import type { TransactionStats } from "types/analytics";
import { TransactionsChartCardUI } from "../../../(team)/_components/TransactionsCard";
import { PieChartCard } from "../../../../components/Analytics/PieChartCard";
import { TransactionsChartCardUI } from "../../../../(team)/_components/TransactionsCard";
import { PieChartCard } from "../../../../../components/Analytics/PieChartCard";

export function TransactionsChartsUI({
data,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import { redirect } from "next/navigation";
import { Suspense } from "react";
import { defineChain, getContract } from "thirdweb";
import { getCompilerMetadata } from "thirdweb/contract";
import { getSortedDeployedContracts } from "../../../../../../account/contracts/_components/getSortedDeployedContracts";
import { getAuthToken } from "../../../../../../api/lib/getAuthToken";
import { loginRedirect } from "../../../../../../login/loginRedirect";
import { getSortedDeployedContracts } from "../../../../../../../account/contracts/_components/getSortedDeployedContracts";
import { getAuthToken } from "../../../../../../../api/lib/getAuthToken";
import { loginRedirect } from "../../../../../../../login/loginRedirect";

const trackingCategory = "smart-wallet";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { getUserOpUsage } from "@/api/analytics";
import { getProject } from "@/api/projects";
import { getTeamBySlug } from "@/api/team";
import { getClientThirdwebClient } from "@/constants/thirdweb-client.client";
import {
type Range,
getLastNDaysRange,
Expand All @@ -9,8 +10,7 @@ import { AccountAbstractionAnalytics } from "components/smart-wallets/AccountAbs
import { AccountAbstractionSummary } from "components/smart-wallets/AccountAbstractionAnalytics/AccountAbstractionSummary";
import { notFound, redirect } from "next/navigation";
import type { SearchParams } from "nuqs/server";
import { getClientThirdwebClient } from "../../../../../../../@/constants/thirdweb-client.client";
import { getAuthToken } from "../../../../../api/lib/getAuthToken";
import { getAuthToken } from "../../../../../../api/lib/getAuthToken";
import { searchParamLoader } from "./search-params";

interface PageParams {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { getTeamBySlug } from "@/api/team";
import { ChakraProviderSetup } from "@/components/ChakraProviderSetup";
import { UnderlineLink } from "@/components/ui/UnderlineLink";
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
import { getClientThirdwebClient } from "@/constants/thirdweb-client.client";
import { AccountAbstractionSettingsPage } from "components/smart-wallets/SponsorshipPolicies";
import { CircleAlertIcon } from "lucide-react";
import { redirect } from "next/navigation";
import { getClientThirdwebClient } from "../../../../../../../../@/constants/thirdweb-client.client";
import { getAuthToken } from "../../../../../../api/lib/getAuthToken";
import { getValidTeamPlan } from "../../../../../components/TeamHeader/getValidTeamPlan";
import { getAuthToken } from "../../../../../../../api/lib/getAuthToken";
import { getValidTeamPlan } from "../../../../../../components/TeamHeader/getValidTeamPlan";

export default async function Page(props: {
params: Promise<{ team_slug: string; project_slug: string }>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { getSMSCountryTiers } from "@/api/sms";
import { getTeamBySlug } from "@/api/team";
import { InAppWalletSettingsPage } from "components/embedded-wallets/Configure";
import { redirect } from "next/navigation";
import { getValidTeamPlan } from "../../../../../components/TeamHeader/getValidTeamPlan";
import { getValidTeamPlan } from "../../../../../../components/TeamHeader/getValidTeamPlan";

export default async function Page(props: {
params: Promise<{ team_slug: string; project_slug: string }>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { getProject } from "@/api/projects";
import { InAppWalletUsersPageContent } from "components/embedded-wallets/Users";
import { redirect } from "next/navigation";
import { getAuthToken } from "../../../../../../api/lib/getAuthToken";
import { loginRedirect } from "../../../../../../login/loginRedirect";
import { getAuthToken } from "../../../../../../../api/lib/getAuthToken";
import { loginRedirect } from "../../../../../../../login/loginRedirect";
import { TRACKING_CATEGORY } from "../_constants";

export default async function Page(props: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { getProject } from "@/api/projects";
import { Spinner } from "@/components/ui/Spinner/Spinner";
import { PayAnalytics } from "components/pay/PayAnalytics/PayAnalytics";
import { PayAnalyticsFilter } from "components/pay/PayAnalytics/components/PayAnalyticsFilter";
import { getUniversalBridgeFiltersFromSearchParams } from "lib/time";
import { ArrowUpRightIcon } from "lucide-react";
import { redirect } from "next/navigation";
import {
ResponsiveSearchParamsProvider,
ResponsiveSuspense,
} from "responsive-rsc";
import { Spinner } from "../../../../../../../@/components/ui/Spinner/Spinner";
import { PayAnalyticsFilter } from "../../../../../../../components/pay/PayAnalytics/components/PayAnalyticsFilter";
import { getUniversalBridgeFiltersFromSearchParams } from "../../../../../../../lib/time";

export default async function Page(props: {
params: Promise<{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getProject } from "@/api/projects";
import { getTeamBySlug } from "@/api/team";
import { redirect } from "next/navigation";
import { getTeamBySlug } from "../../../../../../../../@/api/team";
import { PayWebhooksPage } from "./components/webhooks.client";

export default async function Page(props: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { getProject } from "@/api/projects";
import { getTeamBySlug } from "@/api/team";
import { getClientThirdwebClient } from "@/constants/thirdweb-client.client";
import { redirect } from "next/navigation";
import { getClientThirdwebClient } from "../../../../../../@/constants/thirdweb-client.client";
import { DeployedContractsPage } from "../../../../account/contracts/_components/DeployedContractsPage";
import { getAuthToken } from "../../../../api/lib/getAuthToken";
import { loginRedirect } from "../../../../login/loginRedirect";
import { DeployedContractsPage } from "../../../../../account/contracts/_components/DeployedContractsPage";
import { getAuthToken } from "../../../../../api/lib/getAuthToken";
import { loginRedirect } from "../../../../../login/loginRedirect";
import { FooterLinksSection } from "../components/footer/FooterLinksSection";

export default async function Page(props: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"use client";

import { normalizeTimeISOString } from "@/lib/time";
import { DateRangeSelector } from "components/analytics/date-range-selector";
import { IntervalSelector } from "components/analytics/interval-selector";
import {
useResponsiveSearchParams,
useSetResponsiveSearchParams,
} from "responsive-rsc";
import { DateRangeSelector } from "../../../../../../../../components/analytics/date-range-selector";
import { IntervalSelector } from "../../../../../../../../components/analytics/interval-selector";
import { getTxAnalyticsFiltersFromSearchParams } from "../lib/utils";

export function TransactionAnalyticsFilter() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use client";
import type { Project } from "@/api/projects";
import { Button } from "@/components/ui/button";
import { type Step, StepsCard } from "components/dashboard/StepsCard";
import Link from "next/link";
import { useMemo, useState } from "react";
import { Button } from "../../../../../../../../@/components/ui/button";
import CreateServerWallet from "../server-wallets/components/create-server-wallet.client";
import type { Wallet } from "../server-wallets/wallet-table/types";
import CreateVaultAccountButton from "../vault/components/create-vault-account.client";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { engineCloudProxy } from "@/actions/proxies";
import type { Project } from "@/api/projects";
import { SingleNetworkSelector } from "@/components/blocks/NetworkSelectors";
import { CopyTextButton } from "@/components/ui/CopyTextButton";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import {
Expand All @@ -15,14 +16,13 @@ import { useThirdwebClient } from "@/constants/thirdweb.client";
import { useDashboardRouter } from "@/lib/DashboardRouter";
import { zodResolver } from "@hookform/resolvers/zod";
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { useTrack } from "hooks/analytics/useTrack";
import { useAllChainsData } from "hooks/chains/allChains";
import { Loader2Icon, LockIcon } from "lucide-react";
import { useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import * as z from "zod";
import { CopyTextButton } from "../../../../../../../../@/components/ui/CopyTextButton";
import { useTrack } from "../../../../../../../../hooks/analytics/useTrack";
import { useAllChainsData } from "../../../../../../../../hooks/chains/allChains";
import type { Wallet } from "../server-wallets/wallet-table/types";
import { SmartAccountCell } from "../server-wallets/wallet-table/wallet-table-ui.client";
import { deleteUserAccessToken, getUserAccessToken } from "./utils";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ import { ToolTipLabel } from "@/components/ui/tooltip";
import { useThirdwebClient } from "@/constants/thirdweb.client";
import { useDashboardRouter } from "@/lib/DashboardRouter";
import { keepPreviousData, useQuery } from "@tanstack/react-query";
import { ChainIconClient } from "components/icons/ChainIcon";
import { formatDistanceToNowStrict } from "date-fns";
import { format } from "date-fns/format";
import { useAllChainsData } from "hooks/chains/allChains";
import { ExternalLinkIcon, InfoIcon } from "lucide-react";
import Link from "next/link";
import { useState } from "react";
import { ChainIconClient } from "../../../../../../../../../components/icons/ChainIcon";
import type { Wallet } from "../../server-wallets/wallet-table/types";
import type {
Transaction,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Button } from "@/components/ui/button";
import { TabPathLinks } from "@/components/ui/tabs";
import { NEXT_PUBLIC_ENGINE_CLOUD_URL } from "@/constants/public-envs";
import Link from "next/link";
import { EngineIcon } from "../../../../../(dashboard)/(chain)/components/server/icons/EngineIcon";
import { EngineIcon } from "../../../../../../(dashboard)/(chain)/components/server/icons/EngineIcon";

export default async function Page(props: {
params: Promise<{ team_slug: string; project_slug: string }>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NEXT_PUBLIC_ENGINE_CLOUD_URL } from "@/constants/public-envs";
import type { TransactionStats } from "../../../../../../../../types/analytics";
import { getAuthToken } from "../../../../../../api/lib/getAuthToken";
import type { TransactionStats } from "../../../../../../../../../types/analytics";
import { getAuthToken } from "../../../../../../../api/lib/getAuthToken";
import type {
Transaction,
TransactionsResponse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

import type { Project } from "@/api/projects";
import { NEXT_PUBLIC_THIRDWEB_VAULT_URL } from "@/constants/public-envs";
import { updateProjectClient } from "@3rdweb-sdk/react/hooks/useApi";
import {
type VaultClient,
createAccessToken,
createVaultClient,
} from "@thirdweb-dev/vault-sdk";
import { updateProjectClient } from "../../../../../../../../@3rdweb-sdk/react/hooks/useApi";

const SERVER_WALLET_ACCESS_TOKEN_PURPOSE =
"Access Token for All Server Wallets";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { getProject } from "@/api/projects";
import { NEXT_PUBLIC_THIRDWEB_VAULT_URL } from "@/constants/public-envs";
import { createVaultClient, listEoas } from "@thirdweb-dev/vault-sdk";
import { notFound, redirect } from "next/navigation";
import { getAuthToken } from "../../../../../api/lib/getAuthToken";
import { getAuthToken } from "../../../../../../api/lib/getAuthToken";
import { TransactionsAnalyticsPageContent } from "./analytics/analytics-page";
import { EngineChecklist } from "./analytics/ftux.client";
import { TransactionAnalyticsSummary } from "./analytics/summary";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"use client";
import { engineCloudProxy } from "@/actions/proxies";
import type { Project } from "@/api/projects";
import { Button } from "@/components/ui/button";
import {
Expand All @@ -12,11 +13,10 @@ import { Input } from "@/components/ui/input";
import { useDashboardRouter } from "@/lib/DashboardRouter";
import { useMutation } from "@tanstack/react-query";
import { createEoa } from "@thirdweb-dev/vault-sdk";
import { useTrack } from "hooks/analytics/useTrack";
import { Loader2Icon, WalletIcon } from "lucide-react";
import { useState } from "react";
import { toast } from "sonner";
import { engineCloudProxy } from "../../../../../../../../../@/actions/proxies";
import { useTrack } from "../../../../../../../../../hooks/analytics/useTrack";
import { initVaultClient } from "../../lib/vault.client";

export default function CreateServerWallet(props: {
Expand Down
Loading
Loading