ff14-advanced-market-search / saddlebag-with-pockets

This is the Frontend for the FF14 Marketplace
https://saddlebagexchange.com/
Apache License 2.0
29 stars 13 forks source link

add ffxiv url endings #489

Open cohenaj194 opened 2 weeks ago

cohenaj194 commented 2 weeks ago

https://github.com/ff14-advanced-market-search/saddlebag-with-pockets/blob/master/app/routes/queries.world-comparison.tsx

example of adding url endings https://github.com/ff14-advanced-market-search/saddlebag-with-pockets/pull/391/files

cohenaj194 commented 2 weeks ago

@coderabbitai give @DarthNerdus some direction on how to add url endings to the world-comparison search page

coderabbitai[bot] commented 2 weeks ago

[!TIP] For best results, initiate chat on the files or code changes.

@cohenaj194, to add URL endings to the world-comparison search page, here are the steps that @DarthNerdus can follow:

  1. Update the links function:

    • The links function in the app/routes/queries.world-comparison.tsx file already returns a canonical URL. If there are dynamic URL endings (e.g., based on query parameters), they should be appended to this URL.
    • Example:
      export const links: LinksFunction = ({ params }) => [
      {
       rel: 'canonical',
       href: `https://saddlebagexchange.com/queries/world-comparison${params.someDynamicPart ? `/${params.someDynamicPart}` : ''}`
      }
      ]
  2. Update the meta function:

    • If the URL endings affect the page's metadata (e.g., title or description), update the meta function accordingly.
    • Example:
      export const meta: MetaFunction = ({ params }) => {
      return {
       charset: 'utf-8',
       viewport: 'width=device-width,initial-scale=1',
       title: `Saddlebag Exchange: ffxiv export search${params.someDynamicPart ? ` - ${params.someDynamicPart}` : ''}`,
       description: 'Explore and compare FFXIV item prices across different servers with Saddlebag Exchange.'
      }
      }
  3. Include mobileColumnList if relevant:

    • Ensure that mobileColumnList is included in the page if it's relevant to avoid mapping issues.

Let me know if you need further assistance!

Analysis chain
Scripts executed The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Fetch the contents of the example PR to understand how URL endings were added. gh pr view 391 --repo ff14-advanced-market-search/saddlebag-with-pockets --json files --jq '.files[] | select(.path == "app/routes/queries.world-comparison.tsx") | .patch' # Fetch the contents of the `app/routes/queries.world-comparison.tsx` file to understand its current structure. cat app/routes/queries.world-comparison.tsx ``` Length of output: 13166

Learnings used ``` Learnt from: cohenaj194 PR: ff14-advanced-market-search/saddlebag-with-pockets#469 File: app/routes/ffxiv.extended-history.tsx:227-227 Timestamp: 2024-07-18T03:24:58.546Z Learning: In the ff14-advanced-market-search/saddlebag-with-pockets repository, always include `mobileColumnList` in all `app/route` pages to avoid mapping issues. ``` --- ``` Learnt from: cohenaj194 PR: ff14-advanced-market-search/saddlebag-with-pockets#0 File: :0-0 Timestamp: 2024-06-09T21:34:49.875Z Learning: User: cohenaj194 prefers detailed, actionable responses that directly address the code issues with specific solutions and examples. ```