Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy v4.0.0 #6469

Merged
merged 133 commits into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
e09805c
initial core files migration to ts
pettinarip Apr 14, 2022
447acce
add graphql codegen
pettinarip Apr 14, 2022
037101d
ignore from prettier the generated graphql types file
pettinarip Apr 14, 2022
53dcf69
Merge branch 'dev' into ts
pettinarip Apr 14, 2022
bd11896
Add DAOs section
minimalsm Apr 15, 2022
598aaf9
gatsby ssr to ts
pettinarip Apr 18, 2022
de72fc0
rerun graphql types
pettinarip Apr 18, 2022
d275f54
gatsby browser to ts
pettinarip Apr 18, 2022
a4b4f77
Added ERC-4626 to token standards [Fixes #6255]
wolz-CODElife May 7, 2022
0cb7df8
Created ERC-4626 blog
wolz-CODElife May 7, 2022
28b3ca1
Created ERC-4626 blog [Fixes #6255]
wolz-CODElife May 7, 2022
4ffc6d2
Edited markdown syntax in index.md [Fixes #6255]
wolz-CODElife May 7, 2022
ada4143
Added ERC-4626 to Token standards [Fixes #6255]
wolz-CODElife May 7, 2022
6205eb2
Added ERC-4626 to docs link [Fixes #6255]
wolz-CODElife May 7, 2022
41f0e0c
Added ERC-4626 [Fixes #6255]
wolz-CODElife May 7, 2022
e4b4355
Added ERC-4626 [Fixes #6255]
wolz-CODElife May 7, 2022
b339f4e
Added ERC-4626 [Fixes #6255]
wolz-CODElife May 7, 2022
399c94a
remove auto generated queries types
pettinarip May 11, 2022
180eee8
rename translations file to languages
pettinarip May 12, 2022
c0056f4
cleanup
pettinarip May 12, 2022
fbb16b9
Merge branch 'dev' into ts
pettinarip May 12, 2022
edf6973
move languages functions from translations.ts to languages.ts
pettinarip May 12, 2022
0e84cc8
fix bad imports
pettinarip May 12, 2022
0bc9bcf
exec docsearch script with ts-node
pettinarip May 13, 2022
8c967ec
Apply suggestions from code review
minimalsm May 16, 2022
7e896f0
add codegen to build queries types and migrate index page to ts
pettinarip May 18, 2022
aeab506
install styled components types
pettinarip May 18, 2022
954dfc3
fix type errors on gatsby images
pettinarip May 18, 2022
a85ec3b
migrate ButtonLink, Link and Icon components
pettinarip May 18, 2022
8b41042
update Guido's score
asanso May 19, 2022
b81d89f
refactor our types and interfaces files to be a bit more organized
pettinarip May 19, 2022
2c08f7e
Merge branch 'dev' into ts
pettinarip May 19, 2022
4a28461
add da lang to our languages file due to merge conflicts
pettinarip May 19, 2022
ea6d453
Merge pull request #6307 from ethereum/ts
pettinarip May 19, 2022
aa30840
Merge branch 'dev' into ts-second-iteration
pettinarip May 19, 2022
4f52f87
fix ButtonLink typing
pettinarip May 19, 2022
0de3ab6
fix types after merge
pettinarip May 19, 2022
035e143
use generated query type on AllMdx query
pettinarip May 19, 2022
a6dca21
Merge pull request #6397 from ethereum/asanso-patch-1
fredriksvantes May 19, 2022
02c15aa
update LUNA -> WBTC in bridges example
jmcook1186 May 20, 2022
e98c231
Merge pull request #6403 from jmcook1186/bridges-page
minimalsm May 20, 2022
e0b1799
πŸ‡΅πŸ‡± Add ETH Warsaw to community meetups list
JustynaBroniszewska May 20, 2022
eff7cbd
Add ETH Warsaw to the second list
JustynaBroniszewska May 20, 2022
151cf5b
Update index.md
hursittarcan May 20, 2022
9a65e24
Fixed common spelling of DEX
hursittarcan May 20, 2022
5d5bbde
Fixed punctuation on Set up your local environment page
hursittarcan May 20, 2022
d646044
migrate functions to ts
pettinarip May 20, 2022
c1a6af4
migrate hooks to ts
pettinarip May 20, 2022
0ae0266
migrate more files
pettinarip May 20, 2022
7759551
create babelrc in order to build lambdas with netlify-lambda
pettinarip May 20, 2022
84299e7
Changed link to testnet 'in node as a service article', fixes #6384
dev-matthew May 20, 2022
0d71efd
Update index.md
theexoticman May 22, 2022
ffa5a92
Updating Learning-tools.js
nativeanish May 22, 2022
e7d5b8e
Change backslash to slash
lukassim May 22, 2022
6d22744
Fixed typo.
spilehchiha May 23, 2022
8c7d953
fix i18n link in wallets/find-wallet [Fixes #6423]
rwv May 23, 2022
8316fdf
Merge pull request #6050 from ethereum/web3DAOs
minimalsm May 23, 2022
d2a24fe
docs: update README.md [skip ci]
allcontributors[bot] May 23, 2022
22625aa
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] May 23, 2022
c836361
Merge pull request #6425 from ethereum/all-contributors/add-wolz-CODE…
minimalsm May 23, 2022
9239150
Merge pull request #6256 from wolz-CODElife/erc-4626
minimalsm May 23, 2022
83b7260
docs: update README.md [skip ci]
allcontributors[bot] May 23, 2022
d865ac9
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] May 23, 2022
d65ba60
Merge pull request #6426 from ethereum/all-contributors/add-minaessam…
minimalsm May 23, 2022
5984bad
fix typo: close parenthesis
gnongs May 23, 2022
fdd948c
docs: update README.md [skip ci]
allcontributors[bot] May 23, 2022
2d42756
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] May 23, 2022
5ec9621
Merge pull request #6427 from Choi-Jinhong/fix-typo-close_parenthesis
minimalsm May 23, 2022
90afa7f
Merge pull request #6428 from ethereum/all-contributors/add-Choi-Jinhong
minimalsm May 23, 2022
7274be5
Merge pull request #6424 from rwv/fix-i18n-link-in-wallets/find-wallet
minimalsm May 23, 2022
8ec8549
Merge pull request #6420 from spilehchiha/patch-1
minimalsm May 23, 2022
41eb5b0
docs: update README.md [skip ci]
allcontributors[bot] May 23, 2022
ccaaa9e
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] May 23, 2022
b4afd5f
Merge pull request #6429 from ethereum/all-contributors/add-spilehchiha
minimalsm May 23, 2022
def77e7
Merge pull request #6419 from ethereum/fix-TP-page-error
minimalsm May 23, 2022
865da14
Update src/content/developers/docs/networking-layer/index.md
minimalsm May 23, 2022
3e70f6c
docs: update README.md [skip ci]
allcontributors[bot] May 23, 2022
b1cb8ae
Merge pull request #6417 from theexoticman/patch-1
minimalsm May 23, 2022
d865d04
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] May 23, 2022
db2e24f
Merge pull request #6430 from ethereum/all-contributors/add-theexoticman
minimalsm May 23, 2022
12e31fc
Merge pull request #6418 from nativeanish/patch-1
minimalsm May 23, 2022
fd2111d
docs: update README.md [skip ci]
allcontributors[bot] May 23, 2022
63843cf
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] May 23, 2022
400aa91
Merge pull request #6431 from ethereum/all-contributors/add-nativeanish
minimalsm May 23, 2022
ebf235f
Merge pull request #6411 from HursitTarcan/newhursit
minimalsm May 23, 2022
1287e1f
Merge pull request #6410 from HursitTarcan/hursitdev30
minimalsm May 23, 2022
2ae99d8
expose a .babelrc file to work with netlify-lambda
pettinarip May 21, 2022
9486ac8
Merge branch 'dev' into dev
minimalsm May 23, 2022
0ca3eee
Merge pull request #6409 from HursitTarcan/dev
minimalsm May 23, 2022
189d40a
Merge pull request #6413 from dev-matthew/dev
minimalsm May 23, 2022
ef73ac5
docs: update README.md [skip ci]
allcontributors[bot] May 23, 2022
088dcd1
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] May 23, 2022
5dde7cb
Merge pull request #6436 from ethereum/all-contributors/add-dev-matthew
minimalsm May 23, 2022
3ac7c20
Merge pull request #6408 from JustynaBroniszewska/patch-2
minimalsm May 23, 2022
8f00e8a
docs: update README.md [skip ci]
allcontributors[bot] May 23, 2022
a42fa52
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] May 23, 2022
c41063b
Merge pull request #6407 from JustynaBroniszewska/patch-1
minimalsm May 23, 2022
07eca93
Merge pull request #6437 from ethereum/all-contributors/add-JustynaBr…
minimalsm May 23, 2022
b91809d
remove and cleanup jest/testing code
pettinarip May 23, 2022
014d3b2
Merge branch 'dev' into ts-second-iteration
pettinarip May 23, 2022
012d7c7
update docs
pettinarip May 24, 2022
c529c9f
remove 3rd party codegen plugin and use native one
pettinarip May 24, 2022
c7a98c6
fix warnings
pettinarip May 24, 2022
0f39aec
fix tsconfig
pettinarip May 24, 2022
8ad70bf
Update eth-upgrade-articles.js
wackerow May 24, 2022
b81de53
exclude specific large folders without ts files
pettinarip May 24, 2022
930727a
cleanup
pettinarip May 24, 2022
5285466
fixes grammar
yanil3500 May 24, 2022
ec51112
fixes spelling error
yanil3500 May 24, 2022
6078602
fix Context type and remove unnecessary ts comments
pettinarip May 24, 2022
c5e2a90
fix react useeffect deps
pettinarip May 24, 2022
6dffdb1
fix not deterministic output for gatsby-types generation
pettinarip May 24, 2022
503d9ef
Merge pull request #6450 from yanil3500/dev
minimalsm May 24, 2022
36758ca
docs: update README.md [skip ci]
allcontributors[bot] May 24, 2022
424dd4f
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] May 24, 2022
ccb99de
Merge pull request #6453 from ethereum/all-contributors/add-yanil3500
minimalsm May 24, 2022
c6eb934
FeedbackWidget on English pages only
wackerow May 24, 2022
ebb5e0f
Removes StakeWise Solo from SaaS provider list
wackerow May 24, 2022
7db7cb5
Simplify name to StakeWise
wackerow May 24, 2022
3b6fc57
Update StakeWise information
tsudmi May 25, 2022
f8f7857
Add Wallet to StakeWise platform
tsudmi May 25, 2022
cc8821a
add TTD to glossary
jmcook1186 May 25, 2022
94ab56e
bump gatsby version to 4.15.0 to use graphqlTypegen config property
pettinarip May 25, 2022
2adefb2
gitignore gatsby-types auto-generated file
pettinarip May 25, 2022
08ee97a
Merge pull request #6461 from tsudmi/update-stakewise-info
wackerow May 25, 2022
1d31159
Merge pull request #6462 from jmcook1186/dev
wackerow May 25, 2022
2bc692e
bump volta node version to v16.15.0
pettinarip May 25, 2022
66c6fb7
Merge pull request #6412 from ethereum/ts-second-iteration
pettinarip May 25, 2022
58c7a56
Merge pull request #6456 from ethereum/stakewise-solo-removal
corwintines May 25, 2022
5f623e5
Merge pull request #6455 from ethereum/feedback-patch
wackerow May 25, 2022
90bbf9b
Merge pull request #6446 from ethereum/blog-listings
wackerow May 25, 2022
e0566f5
v4.0.0
pettinarip May 25, 2022
94d4d87
Merge pull request #6468 from ethereum/v4-0-0
pettinarip May 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -7498,6 +7498,87 @@
"code",
"bug"
]
},
{
"login": "wolz-CODElife",
"name": "wolz-CODElife",
"avatar_url": "https://avatars.githubusercontent.com/u/55518764?v=4",
"profile": "http://wolzcodelife.web.app",
"contributions": [
"doc"
]
},
{
"login": "minaessam2015",
"name": "Mina Essam",
"avatar_url": "https://avatars.githubusercontent.com/u/13814552?v=4",
"profile": "https://github.com/minaessam2015",
"contributions": [
"ideas"
]
},
{
"login": "Choi-Jinhong",
"name": "GNONG",
"avatar_url": "https://avatars.githubusercontent.com/u/65050483?v=4",
"profile": "https://jinhongdev.tistory.com/",
"contributions": [
"doc"
]
},
{
"login": "spilehchiha",
"name": "Sina Pilehchiha",
"avatar_url": "https://avatars.githubusercontent.com/u/46059077?v=4",
"profile": "https://github.com/spilehchiha",
"contributions": [
"doc"
]
},
{
"login": "theexoticman",
"name": "thefrenchbrazilianguy",
"avatar_url": "https://avatars.githubusercontent.com/u/10594609?v=4",
"profile": "https://github.com/theexoticman",
"contributions": [
"doc"
]
},
{
"login": "nativeanish",
"name": "Anish Gupta",
"avatar_url": "https://avatars.githubusercontent.com/u/15274388?v=4",
"profile": "http://nativeanish.tech",
"contributions": [
"doc"
]
},
{
"login": "dev-matthew",
"name": "Matthew",
"avatar_url": "https://avatars.githubusercontent.com/u/80741503?v=4",
"profile": "https://github.com/dev-matthew",
"contributions": [
"doc"
]
},
{
"login": "JustynaBroniszewska",
"name": "Justyna Broniszewska",
"avatar_url": "https://avatars.githubusercontent.com/u/33961199?v=4",
"profile": "https://github.com/JustynaBroniszewska",
"contributions": [
"doc"
]
},
{
"login": "yanil3500",
"name": "Elyanil Liranzo-Castro",
"avatar_url": "https://avatars.githubusercontent.com/u/11803254?v=4",
"profile": "https://github.com/yanil3500",
"contributions": [
"doc"
]
}
],
"contributorsPerLine": 7,
Expand Down
16 changes: 16 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Expose a custom .babelrc in order to let netlify-lambda read it and build the
// TS lambda functions. This way, netlify-lambda & gatsby use the same config.
// ref. https://www.gatsbyjs.com/docs/how-to/custom-configuration/babel/
{
"presets": [
"@babel/preset-typescript",
[
"babel-preset-gatsby",
{
"targets": {
"browsers": [">0.25%", "not dead"]
}
}
]
]
}
7 changes: 6 additions & 1 deletion .github/workflows/docsearch-crawl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ jobs:
steps:
- name: Checkout codebase
uses: actions/checkout@v2
- name: Install node and ts-node
uses: actions/setup-node@v2
with:
node-version: "14"
- run: npm install -g ts-node
- name: Crawl the site
env:
APPLICATION_ID: ${{ secrets.DOCSEARCH_APP_ID }}
API_KEY: ${{ secrets.DOCSEARCH_API_KEY }}
run: |
docker run \
-e APPLICATION_ID -e API_KEY \
-e CONFIG="$(node .github/workflows/docsearchConfigScript.js | cat .github/workflows/docsearchConfig.json)" \
-e CONFIG="$(ts-node -O '{\"module\": \"commonjs\"}' .github/workflows/docsearchConfigScript.js | cat .github/workflows/docsearchConfig.json)" \
algolia/docsearch-scraper:v1.6.0
2 changes: 1 addition & 1 deletion .github/workflows/docsearchConfigScript.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const fs = require("fs")
const translations = require("../../src/data/translations.json")
const translations = require("../../src/utils/languages").default

var config = {
index_name: "prod-ethereum-org",
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,5 @@ yarn-error.log
src/data/contributors.json
# These files are generated by `yarn merge-translations` command
src/intl/*.json
# Auto generated code when gatsby build the site
src/gatsby-types.d.ts
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.cache
package.json
package-lock.json
public
public
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ To create a new function, you will need to create two files:
- One in `src/lambdas` where the logic will live. These are the ones that will be deployed to Netlify. These functions follow [this format](https://docs.netlify.com/functions/build-with-javascript/#synchronous-function-format).
- One in `src/api` that will be just a wrapper around the previous one in order to be compatible with Gatsby functions. More on the [Gatbsy docs](https://www.gatsbyjs.com/docs/reference/functions/getting-started/) for the format they follow.

Typically, you will develop and test functions in the Gatsby context, by running `yarn start`.

In case you want to test them as if you were in a Netlify env, you can install the [Netlify CLI](https://docs.netlify.com/cli/get-started/) and run `netlify dev --framework=gatsby`.

### 6. Submit your PR

- After your changes are committed to your GitHub fork, submit a pull request (PR) to the `dev` branch of the `ethereum/ethereum-org-website` repo
Expand Down Expand Up @@ -1213,6 +1217,19 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center"><a href="https://github.com/JuliusDegesys"><img src="https://avatars.githubusercontent.com/u/3232103?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Julius Degesys</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=JuliusDegesys" title="Documentation">πŸ“–</a></td>
<td align="center"><a href="https://nicolasquiroz.com"><img src="https://avatars.githubusercontent.com/u/948922?v=4?s=100" width="100px;" alt=""/><br /><sub><b>NicolΓ‘s Quiroz</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=nhsz" title="Code">πŸ’»</a> <a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Anhsz" title="Bug reports">πŸ›</a></td>
</tr>
<tr>
<td align="center"><a href="http://wolzcodelife.web.app"><img src="https://avatars.githubusercontent.com/u/55518764?v=4?s=100" width="100px;" alt=""/><br /><sub><b>wolz-CODElife</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=wolz-CODElife" title="Documentation">πŸ“–</a></td>
<td align="center"><a href="https://github.com/minaessam2015"><img src="https://avatars.githubusercontent.com/u/13814552?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mina Essam</b></sub></a><br /><a href="#ideas-minaessam2015" title="Ideas, Planning, & Feedback">πŸ€”</a></td>
<td align="center"><a href="https://jinhongdev.tistory.com/"><img src="https://avatars.githubusercontent.com/u/65050483?v=4?s=100" width="100px;" alt=""/><br /><sub><b>GNONG</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=Choi-Jinhong" title="Documentation">πŸ“–</a></td>
<td align="center"><a href="https://github.com/spilehchiha"><img src="https://avatars.githubusercontent.com/u/46059077?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sina Pilehchiha</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=spilehchiha" title="Documentation">πŸ“–</a></td>
<td align="center"><a href="https://github.com/theexoticman"><img src="https://avatars.githubusercontent.com/u/10594609?v=4?s=100" width="100px;" alt=""/><br /><sub><b>thefrenchbrazilianguy</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=theexoticman" title="Documentation">πŸ“–</a></td>
<td align="center"><a href="http://nativeanish.tech"><img src="https://avatars.githubusercontent.com/u/15274388?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Anish Gupta</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=nativeanish" title="Documentation">πŸ“–</a></td>
<td align="center"><a href="https://github.com/dev-matthew"><img src="https://avatars.githubusercontent.com/u/80741503?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Matthew</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=dev-matthew" title="Documentation">πŸ“–</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/JustynaBroniszewska"><img src="https://avatars.githubusercontent.com/u/33961199?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Justyna Broniszewska</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=JustynaBroniszewska" title="Documentation">πŸ“–</a></td>
<td align="center"><a href="https://github.com/yanil3500"><img src="https://avatars.githubusercontent.com/u/11803254?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Elyanil Liranzo-Castro</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=yanil3500" title="Documentation">πŸ“–</a></td>
</tr>
</table>

<!-- markdownlint-restore -->
Expand Down
1 change: 0 additions & 1 deletion __mocks__/file-mock.js

This file was deleted.

27 changes: 0 additions & 27 deletions __mocks__/gatsby.js

This file was deleted.

40 changes: 20 additions & 20 deletions docs/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Markdown will be translated as whole pages of content, so no specific action is
- This results in significant challenges during the translation process, as written syntax for each language will vary in terms of ordering subjects/verbs/etc.
- If you're wanting to link to something within your sentence, create a link at the end of the sentence or paragraph:

```jsx
```tsx
<p>
All Ethereum transactions require a fee, known as Gas, that gets paid to the
miner. <Link to="link">More on Gas</Link>
Expand All @@ -41,7 +41,7 @@ Markdown will be translated as whole pages of content, so no specific action is

Once, you've added your English content to the appropriate JSON file, the above code should look something more like:

```jsx
```tsx
<p>
<Translation id="page-transactions" />{" "}
<Link to="link">
Expand All @@ -52,11 +52,11 @@ Markdown will be translated as whole pages of content, so no specific action is

- _tl;dr Each individual JSON entry should be a complete phrase by itself_

- This is done using the `Translation` component. However there is an alternative method for regular JS: `gatsby-plugin-intl` with `/src/utils/translations.js`
- This is done using the `Translation` component. However there is an alternative method for regular JS: `gatsby-plugin-intl` with `/src/utils/translations.ts`

- **Method one: `<Translation />` component (preferred if only needed in JSX)**

```jsx
```tsx
import { Translation } from "src/components/Translation"

// Utilize in JSX using
Expand All @@ -65,7 +65,7 @@ Markdown will be translated as whole pages of content, so no specific action is

- **Method two: `translateMessageId()`**

```jsx
```tsx
import { useIntl } from "gatsby-plugin-intl"
import { translateMessageId } from "src/utils/translations"

Expand All @@ -74,19 +74,19 @@ Markdown will be translated as whole pages of content, so no specific action is
translateMessageId("language-json-key", intl)
```

```jsx
```tsx
const siteTitle = translateMessageId("site-title", intl)
```

## React Hooks

- Components and pages are written using arrow function syntax with React hooks in lieu of using class-based components

```jsx
```tsx
// Example
import React, { useState, useEffect } from "react"

const ComponentName = (props) => {
const ComponentName: React.FC = (props) => {
// useState hook for managing state variables
const [greeting, setGreeting] = useState("")

Expand All @@ -103,12 +103,12 @@ export default ComponentName

## Styling

- `src/theme.js` - Declares site color themes, breakpoints and other constants (try to utilize these colors first)
- `src/theme.ts` - Declares site color themes, breakpoints and other constants (try to utilize these colors first)
- We use [styled-components](https://styled-components.com/)

- Tagged template literals are used to style custom components

```jsx
```tsx
// Example of styling syntax using styled-components

import styled from "styled-components"
Expand All @@ -130,10 +130,10 @@ export default ComponentName

- Recommended VS Code Plugin: `vscode-styled-components` <br>To install: Open VS Code > `Ctrl+P` / `Cmd+P` > Run: <br>`ext install vscode-styled-components`

- Values from `src/theme.js` are automatically passed as a prop object to styled components
- Values from `src/theme.ts` are automatically passed as a prop object to styled components

```jsx
// Example of theme.js usage
```tsx
// Example of theme.ts usage

import styled from "styled-components"

Expand All @@ -148,7 +148,7 @@ export default ComponentName
- [Framer Motion](https://www.framer.com/motion/) - An open source and production-ready motion library for React on the web, used for our animated designs
- **Emojis**: We use [Twemoji](https://twemoji.twitter.com/), an open-source emoji set created by Twitter. These are hosted by us, and used to provide a consistent experience across operating systems.

```jsx
```tsx
// Example of emoji use
import Emoji from "./Emoji"

Expand All @@ -157,12 +157,12 @@ import Emoji from "./Emoji"
```

- **Icons**: We use [React Icons](https://react-icons.github.io/react-icons/)
- `src/components/Icon.js` is the component used to import icons to be used
- `src/components/Icon.ts` is the component used to import icons to be used
- If an icon you want to use is not listed you will need to add it to this file

`src/components/Icon.js`:
`src/components/Icon.ts`:

```jsx
```tsx
// Example of how to add new icon not listed
import { ZzIconName } from "react-icons/zz"

Expand All @@ -174,7 +174,7 @@ import { ZzIconName } from "react-icons/zz"

From React component:

```jsx
```tsx
// Example of icon use
import Icon from "./Icon"

Expand All @@ -187,7 +187,7 @@ import Icon from "./Icon"
- [Gatsby + GraphQL](https://www.gatsbyjs.com/docs/graphql/) used for loading of images and preferred for API calls (in lieu of REST, if possible/practical). Utilizes static page queries that run at build time, not at run time, optimizing performance.
- Image loading example:

```jsx
```tsx
import { graphql } from "gatsby"

export const query = graphql`
Expand All @@ -209,7 +209,7 @@ export const query = graphql`

- API call example:

```jsx
```tsx
import { graphql } from "gatsby"

export const repoInfo = graphql`
Expand Down
Loading