Skip to content

Redirection fixes - #59

Merged
dev-rathore merged 4 commits into
devfrom
redirection-fixes
Jan 8, 2025
Merged

dev-rathore merged 4 commits into
devfrom
redirection-fixes

Conversation

@dev-rathore

@dev-rathore dev-rathore commented Jan 8, 2025 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Configuration

    • Updated app scheme from single value to array, now using "trendly-brands"
  • Navigation

    • Enhanced platform-specific navigation logic
    • Improved user redirection based on session state and platform type

@dev-rathore dev-rathore self-assigned this Jan 8, 2025
@coderabbitai

coderabbitai Bot commented Jan 8, 2025 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@dev-rathore has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 7 minutes and 21 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 70344db and 70b823a.

📒 Files selected for processing (2)
  • app/_layout.tsx (2 hunks)
  • contexts/auth-context.provider.tsx (1 hunks)

Walkthrough

The pull request introduces changes to the app.json configuration file and the app/_layout.tsx file. In app.json, the "scheme" property has been modified from a single string to an array with one element, potentially preparing for future multi-scheme support. The app/_layout.tsx file now includes platform-specific navigation logic, with distinct redirection behaviors for web and non-web platforms based on user authentication status.

Changes

File Change Summary
app.json Updated "scheme" from single string "myapp" to array ["trendly-brands"]
app/_layout.tsx Added platform-specific navigation logic in useEffect hook, differentiating redirection for web and non-web platforms based on authentication state

Sequence Diagram

sequenceDiagram
    participant User
    participant App
    participant AuthSystem
    participant Navigator

    alt Web Platform
        User->>App: Launches App
        App->>AuthSystem: Check Authentication
        alt Not Signed In
            AuthSystem-->>Navigator: Redirect to "/pre-signin"
        else Signed In
            alt On Root/Pre-Signin Path
                Navigator->>User: Redirect to "/explore-influencers"
            else On Other Path
                Navigator->>User: Maintain Current Path
            end
        end
    else Non-Web Platform
        User->>App: Launches App
        App->>AuthSystem: Check Authentication
        AuthSystem->>Navigator: Redirect Based on Session
    end
Loading

Poem

🐰 A Rabbit's Ode to App Schemes 🚀

From "myapp" to brands so trendy,
Our navigation path grows friendly,
Web or mobile, we'll find our way,
Redirecting with algorithmic sway,
A scheme that dances, light and free! 🌈


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 122bd9b and 70344db.

📒 Files selected for processing (2)
  • app.json (1 hunks)
  • app/_layout.tsx (2 hunks)
🔇 Additional comments (1)
app.json (1)

8-10: Verify compatibility of changing "scheme" to an array

Changing the "scheme" property from a string to an array may affect deep linking and other functionalities that rely on this configuration. Ensure that all parts of the app and related services correctly handle "scheme" as an array.

Please confirm that this change is intentional and that any associated configurations or code that use the "scheme" property have been updated accordingly.

Comment thread app/_layout.tsx Resolved
@dev-rathore
dev-rathore merged commit d75c626 into dev Jan 8, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Jan 8, 2025
dev-rathore added a commit that referenced this pull request Jan 10, 2025
* pushed new contract screens

* fixed member container

* Redesign application and invitation cards (#51)

* redesign application and invitation cards

* added keyboard view

* fixes

* added underline in file attachment

* ui-feedback

* added work

* minor changes

* Repurpose messaging screen (#53)

* repurpose messaging screen

* accept application changes

* added phases

* invitationId as influencerId

* fixed signup signin

* fix: bug on brand creation

* minor changes

* minor changes

* minor changes

* minor changes

* pushed a minor change

* fix: accept application (#56)

* fix: accept application

* fix: managerId

* ui fix

* Redirection fixes (#59)

* fix: initial redirections

* scheme change

* router navigate fix

* router navigate fix

* Redirection changes (#61)

* redirection changes

* redirection changes

* image component and other fixes

* No brands protected screen implementation (#64)

* added no brands protected screen and shimmer ui

* shimmer ui update

* added loading indicator

---------

Co-authored-by: Manan Sharma <112090668+Manan-Sharma-5@users.noreply.github.com>
dev-rathore added a commit that referenced this pull request Jan 15, 2025
* pushed new contract screens

* fixed member container

* Redesign application and invitation cards (#51)

* redesign application and invitation cards

* added keyboard view

* fixes

* added underline in file attachment

* ui-feedback

* added work

* minor changes

* Repurpose messaging screen (#53)

* repurpose messaging screen

* accept application changes

* added phases

* invitationId as influencerId

* fixed signup signin

* fix: bug on brand creation

* minor changes

* minor changes

* minor changes

* minor changes

* pushed a minor change

* fix: accept application (#56)

* fix: accept application

* fix: managerId

* ui fix

* Redirection fixes (#59)

* fix: initial redirections

* scheme change

* router navigate fix

* router navigate fix

* Redirection changes (#61)

* redirection changes

* redirection changes

* image component and other fixes

* No brands protected screen implementation (#64)

* added no brands protected screen and shimmer ui

* shimmer ui update

* added loading indicator

* brand protected screen bug fix

* shared-uis conflict

* shared-uis conflict

* fix: build

* pushed ui fixes

* social button change

* Bug fixes (#68)

* bug fixes

* bug fixes

* message screen fix

* pushed ui fix

* pushed icons

* Bug fixes (#69)

* bug fixes

* render html, location address, and rating section

* refactored code

* refactor

* refactor

* location address changes

* messages icons changes

---------

Co-authored-by: Manan Sharma <112090668+Manan-Sharma-5@users.noreply.github.com>
dev-rathore added a commit that referenced this pull request Jan 23, 2025
* pushed new contract screens

* fixed member container

* Redesign application and invitation cards (#51)

* redesign application and invitation cards

* added keyboard view

* fixes

* added underline in file attachment

* ui-feedback

* added work

* minor changes

* Repurpose messaging screen (#53)

* repurpose messaging screen

* accept application changes

* added phases

* invitationId as influencerId

* fixed signup signin

* fix: bug on brand creation

* minor changes

* minor changes

* minor changes

* minor changes

* pushed a minor change

* fix: accept application (#56)

* fix: accept application

* fix: managerId

* ui fix

* Redirection fixes (#59)

* fix: initial redirections

* scheme change

* router navigate fix

* router navigate fix

* Redirection changes (#61)

* redirection changes

* redirection changes

* image component and other fixes

* No brands protected screen implementation (#64)

* added no brands protected screen and shimmer ui

* shimmer ui update

* added loading indicator

* brand protected screen bug fix

* shared-uis conflict

* shared-uis conflict

* fix: build

* pushed ui fixes

* social button change

* Bug fixes (#68)

* bug fixes

* bug fixes

* message screen fix

* pushed ui fix

* pushed icons

* Bug fixes (#69)

* bug fixes

* render html, location address, and rating section

* refactored code

* refactor

* refactor

* location address changes

* messages icons changes

* pushed new icons

* pushed brand modal fixes

* pushed changes

* Icons changes (#73)

* icons changes

* icons changes

* email verification

* changed icon

* pushed slight change to dev for a slight route change

* merge conflict

* refactor code (#75)

---------

Co-authored-by: Manan Sharma <112090668+Manan-Sharma-5@users.noreply.github.com>
dev-rathore added a commit that referenced this pull request Jan 27, 2025
* pushed new contract screens

* fixed member container

* Redesign application and invitation cards (#51)

* redesign application and invitation cards

* added keyboard view

* fixes

* added underline in file attachment

* ui-feedback

* added work

* minor changes

* Repurpose messaging screen (#53)

* repurpose messaging screen

* accept application changes

* added phases

* invitationId as influencerId

* fixed signup signin

* fix: bug on brand creation

* minor changes

* minor changes

* minor changes

* minor changes

* pushed a minor change

* fix: accept application (#56)

* fix: accept application

* fix: managerId

* ui fix

* Redirection fixes (#59)

* fix: initial redirections

* scheme change

* router navigate fix

* router navigate fix

* Redirection changes (#61)

* redirection changes

* redirection changes

* image component and other fixes

* No brands protected screen implementation (#64)

* added no brands protected screen and shimmer ui

* shimmer ui update

* added loading indicator

* brand protected screen bug fix

* shared-uis conflict

* shared-uis conflict

* fix: build

* pushed ui fixes

* social button change

* Bug fixes (#68)

* bug fixes

* bug fixes

* message screen fix

* pushed ui fix

* pushed icons

* Bug fixes (#69)

* bug fixes

* render html, location address, and rating section

* refactored code

* refactor

* refactor

* location address changes

* messages icons changes

* pushed new icons

* pushed brand modal fixes

* pushed changes

* Icons changes (#73)

* icons changes

* icons changes

* email verification

* changed icon

* pushed slight change to dev for a slight route change

* merge conflict

* refactor code (#75)

* feedbacks resolved (#77)

* pushed changes

* Feedbacks resolved (#79)

* feedbacks resolved

* max width refactor

* removed unused imports

* reusable component fix

---------

Co-authored-by: Manan Sharma <112090668+Manan-Sharma-5@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants