Skip to content

Commit

Permalink
fix(i18n): zh-hans not working
Browse files Browse the repository at this point in the history
should be part of #26;

add ./.github/workflows/buildtest.yml to make sure `run build` should not fail
  • Loading branch information
tx0c committed Oct 25, 2021
1 parent 1601608 commit 6250db7
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 4 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/buildtest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build & Test

# Triggers the workflow on push or pull request events
on: pull_request

jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Cache Dependencies
id: cache
uses: actions/[email protected]
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-

- name: Build
run: |
npm ci && \
npm run lint && \
npm run build
11 changes: 7 additions & 4 deletions src/views/Homepage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,24 @@ type DataProps = {
}
}

const Homepage: React.FC<PageProps<DataProps>> = ({ data, path }) => {
const { locale } = useLocalization()
const Homepage: React.FC<PageProps<DataProps>> = ({
pageContext: { locale, originalPath },
}) => {
// const { locale } = useLocalization()

return (
<>
<SEO title="CryptoMatties" lang={locale} />

<Header />
<Header {...{ locale, originalPath }} />
<main>
<Hero />
<Roadmap />
<Benefits />
<Questions />
</main>

<Footer />
<Footer {...{ locale, originalPath }} />
</>
)
}
Expand Down

0 comments on commit 6250db7

Please sign in to comment.