Skip to content

Commit

Permalink
Revert "fix prettier"
Browse files Browse the repository at this point in the history
This reverts commit e8e440f.
  • Loading branch information
ferrodri committed Apr 10, 2024
1 parent e8e440f commit eeff509
Show file tree
Hide file tree
Showing 36 changed files with 3,467 additions and 6,877 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/sweep-bugfix.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Bugfix
title: "Sweep: "
title: 'Sweep: '
description: Write something like "We notice ... behavior when ... happens instead of ...""
labels: sweep
body:
Expand All @@ -8,4 +8,4 @@ body:
attributes:
label: Details
description: More details about the bug
placeholder: The bug might be in ... file
placeholder: The bug might be in ... file
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/sweep-feature.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Feature Request
title: "Sweep: "
title: 'Sweep: '
description: Write something like "Write an api endpoint that does "..." in the "..." file"
labels: sweep
body:
Expand All @@ -8,4 +8,4 @@ body:
attributes:
label: Details
description: More details for Sweep
placeholder: The new endpoint should use the ... class from ... file because it contains ... logic
placeholder: The new endpoint should use the ... class from ... file because it contains ... logic
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/sweep-refactor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Refactor
title: "Sweep: "
title: 'Sweep: '
description: Write something like "Modify the ... api endpoint to use ... version and ... framework"
labels: sweep
body:
Expand All @@ -8,4 +8,4 @@ body:
attributes:
label: Details
description: More details for Sweep
placeholder: We are migrating this function to ... version because ...
placeholder: We are migrating this function to ... version because ...
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ run-name: ${{ github.actor }} - ${{ github.event_name }} - ${{ github.repository
on:
pull_request:
branches:
- "main"
- 'main'
push:
branches:
- "main"
- 'main'

jobs:
lint-prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: yarn install
- name: Lint with Prettier
run: yarn check-prettier
lint-prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: yarn install
- name: Lint with Prettier
run: yarn check-prettier
28 changes: 14 additions & 14 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
}
]
}
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
}
]
}
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,15 @@ NextJS has some peculiar data access patterns given the mix of server-side and c

#### Data fetching

When rendering the various components on the page on the server, it's commong that many different components need to access the same data for a single request. For example, a user's address or ENS name may need to be displayed both on a component on the page and in the page metdata.
When rendering the various components on the page on the server, it's commong that many different components need to access the same data for a single request. For example, a user's address or ENS name may need to be displayed both on a component on the page and in the page metdata.

To avoid re-fetching the same data for a given request, Next.JS includes the `fetch('example.api/resource')` API, which retrieves and caches external resources ([see](https://nextjs.org/docs/app/building-your-application/data-fetching)).
To avoid re-fetching the same data for a given request, Next.JS includes the `fetch('example.api/resource')` API, which retrieves and caches external resources ([see](https://nextjs.org/docs/app/building-your-application/data-fetching)).

When we're unable to use the `fetch()` (e.g. because we're accessing data via the Primsa ORM client, via the DynamoDB client, etc.) the pattern we have adopted to make sure that these resources are not being fetched and re-fetched needlessly in the single request is to use the react cache to manually wrap these accesses.
When we're unable to use the `fetch()` (e.g. because we're accessing data via the Primsa ORM client, via the DynamoDB client, etc.) the pattern we have adopted to make sure that these resources are not being fetched and re-fetched needlessly in the single request is to use the react cache to manually wrap these accesses.

As mentioned above, all data access code under `/api` should

1. be wrapped in a `React.cache` invocation
2. by default, _only_ export cache-wrapped data accesses, to prevent unintentional mutliple fetching
As mentioned above, all data access code under `/api` should
1) be wrapped in a `React.cache` invocation
2) by default, _only_ export cache-wrapped data accesses, to prevent unintentional mutliple fetching

See `/src/app/api/common/delegates/getDelegates.ts` for an example.

Expand Down Expand Up @@ -183,6 +182,8 @@ This is where all of the images, fonts, and other assets will live.

We have integrated [OpenTelemetry](https://opentelemetry.io/) (OTel) to aid in instrumenting the application. OTel is a vendor-agnostic observability providing a single set of APIs, libraries, agents, and instrumentation to capture distributed traces and metrics.



## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Expand Down
2 changes: 1 addition & 1 deletion components.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
"components": "@/components",
"utils": "@/lib/utils"
}
}
}
2 changes: 1 addition & 1 deletion cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
// }
// }
// }
// }
4 changes: 2 additions & 2 deletions cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// ***********************************************************

// Import commands.js using ES2015 syntax:
import "./commands";
import './commands'

// Alternatively you can use CommonJS syntax:
// require('./commands')
// require('./commands')
16 changes: 8 additions & 8 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ const nextConfig = {
async redirects() {
return [
{
source: "/delegate/:addressOrENSName",
destination: "/delegates/:addressOrENSName",
source: '/delegate/:addressOrENSName',
destination: '/delegates/:addressOrENSName',
permanent: true,
},
{
source: "/api/v1/proposals/:proposalId",
destination: "/404",
source: '/api/v1/proposals/:proposalId',
destination: '/404',
permanent: true,
},
{
source: "/api/v1/proposals",
destination: "/404",
source: '/api/v1/proposals',
destination: '/404',
permanent: true,
},
];
]
},
async headers() {
return [
Expand Down Expand Up @@ -75,7 +75,7 @@ const nextConfig = {
experimental: {
instrumentationHook: true,
// Necessary to prevent github.com/open-telemetry/opentelemetry-js/issues/4297
serverComponentsExternalPackages: ["@opentelemetry/sdk-node"],
serverComponentsExternalPackages: ["@opentelemetry/sdk-node"]
},
};

Expand Down
Loading

0 comments on commit eeff509

Please sign in to comment.