Skip to content

Commit 7560264

Browse files
committed
added documentation link to dashboard
1 parent d05e3ec commit 7560264

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

docs/src/pages/index.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
2-
import Layout from "@theme/Layout";
1+
import React from "react";
2+
import { Redirect } from "@docusaurus/router";
33

44
export default function Home() {
5-
const { siteConfig } = useDocusaurusContext();
6-
return (
7-
<Layout
8-
title={`Hello from ${siteConfig.title}`}
9-
description="Description will go into a meta tag in <head />"
10-
></Layout>
11-
);
5+
return <Redirect to="/docs/getting-started/setup" />;
126
}

packages/stack-server/.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ FACEBOOK_CLIENT_ID=# enter your facebook client id here
1313
FACEBOOK_CLIENT_SECRET=# enter your facebook client secret here
1414
MICROSOFT_CLIENT_ID=# enter your microsoft client id here
1515
MICROSOFT_CLIENT_SECRET=# enter your microsoft client secret here
16+
MICROSOFT_TENANT_ID=# enter your microsoft tenant id here
1617

1718
DATABASE_CONNECTION_STRING=# enter your connection string here
1819
DIRECT_DATABASE_CONNECTION_STRING=# enter your direct (unpooled or session mode) database connection string here
1920

2021
STACK_ACCESS_TOKEN_EXPIRATION_TIME=# enter the expiration time for the access token here
22+
23+
NEXT_PUBLIC_DOC_URL=http://localhost:8104

packages/stack-server/src/app/(main)/(protected)/projects/[projectId]/onboarding-dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export function OnboardingDialog() {
6464
{/* TODO: Add document link */}
6565
<Stack spacing={1}>
6666
<Paragraph body>
67-
Here are your new API keys. Please copy this to your .env.local file. Detailed instruction can be founder <Link href="/docs/getting-started">here</Link>.
67+
Here are your new API keys. Please copy this to your .env.local file. Detailed instruction can be found <Link rel="noopener noreferrer" target="_blank" href={process.env.NEXT_PUBLIC_DOC_URL || ""}>here</Link>.
6868
</Paragraph>
6969
<EnvKeys projectId={project.id} publishableClientKey={apiKey.publishableClientKey} secretServerKey={apiKey.secretServerKey} />
7070
<Paragraph body>

packages/stack-server/src/app/(main)/(protected)/projects/[projectId]/settings/api-keys/page-client.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { ApiKeysTable } from "./api-keys-table";
1212
import { useAdminApp } from "../../useAdminInterface";
1313
import { runAsynchronously } from "stack-shared/src/utils/promises";
1414
import EnvKeys from "@/components/env-keys";
15+
import Link from "next/link";
1516

1617

1718
export default function ApiKeysDashboardClient() {
@@ -100,7 +101,7 @@ function CreateNewDialog(props: { open: boolean, onClose(): void, onInvalidate()
100101
<DialogContent>
101102
<Stack spacing={2} overflow='hidden'>
102103
<Paragraph body>
103-
Success! Your new API keys have been created. <Typography fontWeight="bold">Note that you will not be able to view this again</Typography> and you will need to create a new one if you lose it.
104+
Success! Your new API keys have been created. <Typography fontWeight="bold">Note that you will not be able to view this again</Typography> and you will need to create a new one if you lose it. Detailed setup instructions can be found <Link rel="noopener noreferrer" target="_blank" href={process.env.NEXT_PUBLIC_DOC_URL || ""}>here</Link>
104105
</Paragraph>
105106
<EnvKeys
106107
projectId={project.id}

packages/stack-server/src/app/(main)/(protected)/projects/[projectId]/sidebar.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,12 @@ export function Sidebar(props: {
151151
sx={{
152152
minHeight: 0,
153153
overflow: 'hidden auto',
154-
flexGrow: 1,
155154
display: 'flex',
155+
flexGrow: 1,
156156
flexDirection: 'column',
157157
}}
158158
>
159-
<List size="sm" sx={{ gap: 0.25 }}>
159+
<List size="sm" sx={{ gap: 0.25 }}>
160160
{navigationItems.map((item) => (
161161
<SidebarItem
162162
key={item.name}
@@ -165,6 +165,12 @@ export function Sidebar(props: {
165165
href={basePath + item.href}
166166
/>
167167
))}
168+
<Box style={{ flexGrow: 1 }}/>
169+
<SidebarItem
170+
title='Documentation'
171+
icon={<Icon icon="help_outline" />}
172+
href={process.env.NEXT_PUBLIC_DOC_URL || ''}
173+
/>
168174
</List>
169175
</Box>
170176

0 commit comments

Comments
 (0)