Files
Mengdi Chen 451736b557 [DevTools][BE] move shared types & constants to consolidated locations (#26572)
## Summary

This pull request aims to improve the maintainability of the codebase by
consolidating types and constants that are shared between the backend
and frontend. This consolidation will allow us to maintain backwards
compatibility in the frontend in the future.

To achieve this, we have moved the shared types and constants to the
following blessed files:

- react-devtools-shared/src/constants
- react-devtools-shared/src/types
- react-devtools-shared/src/backend/types
- react-devtools-shared/src/backend/NativeStyleEditor/types

Please note that the inclusion of NativeStyleEditor in this list is
temporary, and we plan to remove it once we have a better plugin system
in place.

## How did you test this change?

I have tested it by running `yarn flow dom-node`, which reports no
errors.
2023-04-10 17:07:05 -04:00

36 lines
1006 B
JavaScript

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import * as React from 'react';
import {isInternalFacebookBuild} from 'react-devtools-feature-flags';
import {REACT_DEVTOOLS_WORKPLACE_URL} from 'react-devtools-shared/src/devtools/constants';
import Icon from '../Icon';
import styles from './shared.css';
export default function WorkplaceGroup(): React.Node {
if (!isInternalFacebookBuild) {
return null;
}
return (
<div className={styles.WorkplaceGroupRow}>
<Icon className={styles.ReportIcon} type="facebook" />
<a
className={styles.ReportLink}
href={REACT_DEVTOOLS_WORKPLACE_URL}
rel="noopener noreferrer"
target="_blank"
title="Report bug">
Report this on Workplace
</a>
<div className={styles.FacebookOnly}>(Facebook employees only.)</div>
</div>
);
}