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

style(console): update organization template layout #5713

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
style(console): update organization template layout
  • Loading branch information
xiaoyijun committed Apr 15, 2024
commit fb4af261255a3ec6866ae8526973cddfe9b381d2
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@use '@/scss/underscore' as _;

.withTable {
height: 100%;
padding-bottom: _.unit(6);
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { withAppInsights } from '@logto/app-insights/react/AppInsightsReact';
import { type OrganizationRole } from '@logto/schemas';
import classNames from 'classnames';
import { useState } from 'react';
import { toast } from 'react-hot-toast';
import { useTranslation } from 'react-i18next';
// FIXME: @yijun

Check warning on line 7 in packages/console/src/pages/OrganizationRoleDetails/index.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/console/src/pages/OrganizationRoleDetails/index.tsx#L7

[no-warning-comments] Unexpected 'fixme' comment: 'FIXME: @yijun'.
// eslint-disable-next-line no-restricted-imports
import { Navigate, Route, Routes, useParams } from 'react-router-dom';
import { Navigate, Route, Routes, useLocation, useParams } from 'react-router-dom';
import useSWR, { useSWRConfig } from 'swr';

import Delete from '@/assets/icons/delete.svg';
Expand All @@ -23,6 +24,7 @@

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

const orgRolesPath = `/organization-template/${OrganizationTemplateTabs.OrganizationRoles}`;

Expand All @@ -31,6 +33,8 @@

const { id } = useParams();
const { navigate } = useTenantPathname();
const { pathname } = useLocation();
const isPageHasTable = pathname.endsWith(OrganizationRoleDetailsTabs.Permissions);

const { data, error, mutate, isLoading } = useSWR<OrganizationRole, RequestError>(
id && `api/organization-roles/${id}`
Expand Down Expand Up @@ -63,6 +67,7 @@
backLinkTitle="organization_role_details.back_to_org_roles"
isLoading={isLoading}
error={error}
className={classNames(isPageHasTable && styles.withTable)}
onRetry={mutate}
>
<PageMeta titleKey="organization_role_details.page_title" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@use '@/scss/underscore' as _;

.container {
height: 100%;

> *:not(:first-child) {
margin-top: _.unit(4);
}
Expand Down
Loading