Skip to content
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

feat(console): add guide for organization template page #5647

Merged
Merged
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
17 changes: 16 additions & 1 deletion packages/console/src/pages/OrganizationTemplate/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { withAppInsights } from '@logto/app-insights/react/AppInsightsReact';
import classNames from 'classnames';
import { useState } from 'react';
import { Outlet } from 'react-router-dom';

import Research from '@/assets/icons/research.svg';
import Drawer from '@/components/Drawer';
import PageMeta from '@/components/PageMeta';
import { OrganizationTemplateTabs, organizationTemplateLink } from '@/consts';
import Button from '@/ds-components/Button';
Expand All @@ -12,12 +14,15 @@ import TabNav, { TabNavItem } from '@/ds-components/TabNav';
import useDocumentationUrl from '@/hooks/use-documentation-url';
import * as pageLayout from '@/scss/page-layout.module.scss';

import Introduction from '../Organizations/Guide/Introduction';

import * as styles from './index.module.scss';

const basePathname = '/organization-template';

function OrganizationTemplate() {
const { getDocumentationUrl } = useDocumentationUrl();
const [isGuideDrawerOpen, setIsGuideDrawerOpen] = useState(false);

return (
<div className={classNames(pageLayout.container, styles.container)}>
Expand All @@ -36,9 +41,19 @@ function OrganizationTemplate() {
title="application_details.check_guide"
type="outline"
onClick={() => {
// Todo @xiaoyijun implement guide
setIsGuideDrawerOpen(true);
}}
/>
<Drawer
title="organizations.guide.title"
subtitle="organizations.guide.subtitle"
isOpen={isGuideDrawerOpen}
onClose={() => {
setIsGuideDrawerOpen(false);
}}
>
<Introduction isReadonly />
</Drawer>
</div>
<TabNav>
<TabNavItem href={`${basePathname}/${OrganizationTemplateTabs.OrganizationRoles}`}>
Expand Down
Loading