Device manager - data fetching (PSG-637) (#9151)

* add session manager tab to user settings

* fussy import ordering

* i18n

* extract device fetching logic into hook

* use new extended device type in device tile, add verified metadata

* add current session section, test

* tidy

* update types for DeviceWithVerification
This commit is contained in:
Kerry 2022-08-10 18:14:59 +02:00 committed by GitHub
parent 4e30d3c0fc
commit b7872f2ff7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 434 additions and 13 deletions

View file

@ -14,18 +14,18 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import React from "react";
import React, { HTMLAttributes } from "react";
import Heading from "../../typography/Heading";
export interface SettingsSubsectionProps {
export interface SettingsSubsectionProps extends HTMLAttributes<HTMLDivElement> {
heading: string;
description?: string | React.ReactNode;
children?: React.ReactNode;
}
const SettingsSubsection: React.FC<SettingsSubsectionProps> = ({ heading, description, children }) => (
<div className="mx_SettingsSubsection">
const SettingsSubsection: React.FC<SettingsSubsectionProps> = ({ heading, description, children, ...rest }) => (
<div {...rest} className="mx_SettingsSubsection">
<Heading className="mx_SettingsSubsection_heading" size='h3'>{ heading }</Heading>
{ !!description && <div className="mx_SettingsSubsection_description">{ description }</div> }
<div className="mx_SettingsSubsection_content">