feat: ory network cta for oss only#2634
Conversation
📝 WalkthroughWalkthrough
ChangesOryNetworkCta OSS gating and refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/components/OryNetworkCta/ory-network-cta.tsx (1)
2-2: Replace@ts-expect-errorwith a typed static-asset module declaration.Line 2 uses a global TypeScript error suppression for PNG imports. Since the repo has no existing
*.pngmodule declaration and webpack handles static assets at build time, add a type declaration file to properly type static imports and remove the suppression. This improves type safety while documenting how the build system resolves these assets.Create a
.d.tsfile (e.g.,src/types/assets.d.ts) with:declare module "*.png" { const content: string; export default content; }Then remove the
@ts-expect-errorcomment from line 2.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/components/OryNetworkCta/ory-network-cta.tsx` at line 2, To fix the type safety issue in ory-network-cta.tsx, create a new `.d.ts` file at `src/types/assets.d.ts` that declares the module type for PNG imports, specifying that PNG files resolve to string content at build time. Then remove the `@ts-expect-error` comment from line 2 in the ory-network-cta.tsx file so that TypeScript will use the proper module declaration instead of suppressing the error.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/components/OryNetworkCta/ory-network-cta.tsx`:
- Line 2: To fix the type safety issue in ory-network-cta.tsx, create a new
`.d.ts` file at `src/types/assets.d.ts` that declares the module type for PNG
imports, specifying that PNG files resolve to string content at build time. Then
remove the `@ts-expect-error` comment from line 2 in the ory-network-cta.tsx
file so that TypeScript will use the proper module declaration instead of
suppressing the error.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 1fcf8884-abdb-46b6-844d-d3e5cd4e4f4a
📒 Files selected for processing (1)
src/components/OryNetworkCta/ory-network-cta.tsx
Checklist
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact security@ory.com) from the maintainers to push the changes.
Summary by CodeRabbit
Style
Refactor