Skip to content

Commit

Permalink
use warnOnce and add mark comments as TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
TMisiukiewicz authored and okwasniewski committed Jan 8, 2024
1 parent 4972984 commit 672a0da
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import StyleSheet, {
type ViewStyleProp,
} from '../../StyleSheet/StyleSheet';
import Platform from '../../Utilities/Platform';
import warnOnce from '../../Utilities/warnOnce';
import RCTInputAccessoryViewNativeComponent from './RCTInputAccessoryViewNativeComponent';
import * as React from 'react';

Expand Down Expand Up @@ -86,15 +87,18 @@ type Props = $ReadOnly<{|
|}>;

class InputAccessoryView extends React.Component<Props> {
// once the 'visionos' is implemented as a platform, we can remove this
// TODO: once the 'visionos' is implemented as a platform, we can remove this
componentDidMount() {
if (Platform.isVisionOS) {
console.warn('InputAccessoryView is not available on visionOS platform.');
warnOnce(
'component-unavailable',
'InputAccessoryView is not available on visionOS platform.',
);
}
}

render(): React.Node {
// once the 'visionos' is implemented as a platform, we can remove this
// TODO: once the 'visionos' is implemented as a platform, we can remove this
if (Platform.isVisionOS) {
return null;
}
Expand Down

0 comments on commit 672a0da

Please sign in to comment.