fix(dashboard): broken af
This commit is contained in:
@@ -13,14 +13,14 @@ import SideEffects from './side-effects';
|
||||
interface AppLayoutProps {
|
||||
children: React.ReactNode;
|
||||
params: {
|
||||
organizationId: string;
|
||||
organizationSlug: string;
|
||||
projectId: string;
|
||||
};
|
||||
}
|
||||
|
||||
export default async function AppLayout({
|
||||
children,
|
||||
params: { organizationId, projectId },
|
||||
params: { organizationSlug: organizationId, projectId },
|
||||
}: AppLayoutProps) {
|
||||
const [organizations, projects, dashboards] = await Promise.all([
|
||||
getCurrentOrganizations(),
|
||||
|
||||
@@ -6,10 +6,10 @@ import { getInvites, getProjectsByOrganizationId } from '@openpanel/db';
|
||||
import CreateInvite from './create-invite';
|
||||
|
||||
interface Props {
|
||||
organizationId: string;
|
||||
organizationSlug: string;
|
||||
}
|
||||
|
||||
const InvitesServer = async ({ organizationId }: Props) => {
|
||||
const InvitesServer = async ({ organizationSlug: organizationId }: Props) => {
|
||||
const [invites, projects] = await Promise.all([
|
||||
getInvites(organizationId),
|
||||
getProjectsByOrganizationId(organizationId),
|
||||
|
||||
@@ -3,10 +3,10 @@ import { MembersTable } from '@/components/settings/members';
|
||||
import { getMembers, getProjectsByOrganizationId } from '@openpanel/db';
|
||||
|
||||
interface Props {
|
||||
organizationId: string;
|
||||
organizationSlug: string;
|
||||
}
|
||||
|
||||
const MembersServer = async ({ organizationId }: Props) => {
|
||||
const MembersServer = async ({ organizationSlug: organizationId }: Props) => {
|
||||
const [members, projects] = await Promise.all([
|
||||
getMembers(organizationId),
|
||||
getProjectsByOrganizationId(organizationId),
|
||||
|
||||
@@ -14,13 +14,13 @@ import MembersServer from './members';
|
||||
|
||||
interface PageProps {
|
||||
params: {
|
||||
organizationId: string;
|
||||
organizationSlug: string;
|
||||
};
|
||||
searchParams: Record<string, string>;
|
||||
}
|
||||
|
||||
export default async function Page({
|
||||
params: { organizationId },
|
||||
params: { organizationSlug: organizationId },
|
||||
searchParams,
|
||||
}: PageProps) {
|
||||
const tab = parseAsStringEnum(['org', 'members', 'invites'])
|
||||
|
||||
@@ -9,11 +9,13 @@ import ListProjects from './list-projects';
|
||||
|
||||
interface PageProps {
|
||||
params: {
|
||||
organizationId: string;
|
||||
organizationSlug: string;
|
||||
};
|
||||
}
|
||||
|
||||
export default async function Page({ params: { organizationId } }: PageProps) {
|
||||
export default async function Page({
|
||||
params: { organizationSlug: organizationId },
|
||||
}: PageProps) {
|
||||
const [projects, clients] = await Promise.all([
|
||||
getProjectsByOrganizationId(organizationId),
|
||||
getClientsByOrganizationId(organizationId),
|
||||
|
||||
@@ -8,17 +8,20 @@ import { getCurrentOrganizations, getCurrentProjects } from '@openpanel/db';
|
||||
|
||||
interface PageProps {
|
||||
params: {
|
||||
organizationId: string;
|
||||
organizationSlug: string;
|
||||
};
|
||||
}
|
||||
|
||||
export default async function Page({ params: { organizationId } }: PageProps) {
|
||||
export default async function Page({
|
||||
params: { organizationSlug: organizationId },
|
||||
}: PageProps) {
|
||||
const [organizations, projects] = await Promise.all([
|
||||
getCurrentOrganizations(),
|
||||
getCurrentProjects(organizationId),
|
||||
]);
|
||||
|
||||
const organization = organizations.find((org) => org.id === organizationId);
|
||||
console.log(organizations, organizationId, projects);
|
||||
|
||||
if (!organization) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user