Skip to content

Commit

Permalink
fix: Move #if check up
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy committed Jan 20, 2025
1 parent a8b075d commit 10d208a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/nitrogen/src/views/CppHybridViewComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ ${name}([&]() -> CachedProp<${type}> {
const componentCode = `
${createFileMetadataString(`${component}.cpp`)}
#if REACT_NATIVE_VERSION >= 78
#include "${component}.hpp"
#include <string>
#include <exception>
Expand All @@ -202,8 +204,6 @@ ${createFileMetadataString(`${component}.cpp`)}
#include <react/renderer/core/ComponentDescriptor.h>
#include <react/renderer/components/view/ViewProps.h>
#if REACT_NATIVE_VERSION >= 78
namespace ${namespace} {
${propsClassName}::${propsClassName}(const react::PropsParserContext& context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
/// Copyright © 2025 Marc Rousavy @ Margelo
///

#if REACT_NATIVE_VERSION >= 78

#include "HybridTestViewComponent.hpp"
#include <string>
#include <exception>
Expand All @@ -15,8 +17,6 @@
#include <react/renderer/core/ComponentDescriptor.h>
#include <react/renderer/components/view/ViewProps.h>

#if REACT_NATIVE_VERSION >= 78

namespace margelo::nitro::image::views {

HybridTestViewProps::HybridTestViewProps(const react::PropsParserContext& context,
Expand Down

0 comments on commit 10d208a

Please sign in to comment.