Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(website): ecosystem page (#149)
* feat(website): ecosystem page layout * fix(website): ecosystem layout * feat(website): ecosystem page partners * fix(website): ecosystem page mobile layout * fix(website): image mobile pos, tabs scroll * fix(website): tabs overflow * fix(website): resolve comment * fix(website): add color to config * fix(website): change type with enum & refactor * fix(website): change types in data array * chore(website): remove unused imports * feat(website): add storybook * feat(website): use variables and update config * feat(website): storyblok init * fix(website): priority title block image * feat(website): get data from storyblok * fix(website): remove local partners data * fix(website): enums, interface, partner card * fix(website): revalidate data * fix(website): change card name font family * fix(website): revalidate data & format code * fix(website): storyblok init in exact page * fix(website): update img title block * fix(website): close burger menu after click * fi(website): img ecosystem fund page title block * fix(website): change img index page contact block * сhore(website): remove unused img * fix(website): add ecocystem link * fix(website): change icon height, link width * fix(website): storyblok data version * fix(website): use vercel_env for storyblok * fix(website): tabs border & overflow * fix(website): buttons apply block * fix(website): resolve requested comments * fix(website): resolve more requested comments * fix(website): resolve some more comments * fix(website): sbInit back into getStaticProps * fix(website): add new partner type * chore(website): remove unused async * chore(website): stop use unnecessary slug const * fix(website): storyblok data types * fix(website): filter & render filtered partners * chore: add missing new lines * fix(website): fix partner card image width * fix(website): move website link arrow card on partner card * ci: add storyblock token to build job * ci: use self-hosted runner --------- Signed-off-by: Jihad Hadj Husein <88910027+hadzhehsen@users.noreply.github.com> Co-authored-by: Oleg Shilov <me@olegshilov.com>
- Loading branch information
1 parent
feba769
commit ad08c7f
Showing
37 changed files
with
837 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
.vscode | ||
|
||
# local env files | ||
.env*.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,5 +32,8 @@ export default withNx( | |
}, | ||
]; | ||
}, | ||
images: { | ||
domains: ['a.storyblok.com'], | ||
}, | ||
}), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { getStoryblokApi, storyblokInit, apiPlugin } from '@storyblok/react'; | ||
|
||
interface PartnerData { | ||
_uid: string; | ||
name: string; | ||
logo: { | ||
filename: string; | ||
}; | ||
link: string; | ||
description: string; | ||
type: string; | ||
status: string; | ||
} | ||
|
||
interface StoryblokData { | ||
story: { | ||
content: { | ||
body: { | ||
columns: PartnerData; | ||
}; | ||
}; | ||
}; | ||
} | ||
|
||
function mapStoryblockDataToPartners(data: StoryblokData) { | ||
return data.story.content.body[0].columns.map((el: PartnerData) => { | ||
return { | ||
_uid: el._uid, | ||
name: el.name, | ||
logoUrl: el.logo.filename, | ||
link: el.link, | ||
description: el.description, | ||
type: el.type, | ||
status: el.status, | ||
}; | ||
}); | ||
} | ||
|
||
export { EcosystemPage as default } from '@haqq/website/ecosystem-page'; | ||
|
||
export async function getStaticProps() { | ||
let data; | ||
|
||
storyblokInit({ | ||
accessToken: process.env.STORYBLOK_ACCESS_TOKEN, | ||
use: [apiPlugin], | ||
}); | ||
|
||
try { | ||
const storyblokApi = getStoryblokApi(); | ||
const response = await storyblokApi.get('cdn/stories/partners', { | ||
version: process.env.VERCEL_ENV === 'production' ? 'published' : 'draft', | ||
}); | ||
data = response?.data; | ||
} catch (error) { | ||
console.error(error); | ||
} | ||
|
||
const partners = mapStoryblockDataToPartners(data); | ||
|
||
return { | ||
props: { | ||
partners: partners ?? [], | ||
key: data?.story?.id ?? false, | ||
}, | ||
revalidate: 1800, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@nx/react/babel", | ||
{ | ||
"runtime": "automatic", | ||
"useBuiltIns": "usage" | ||
} | ||
] | ||
], | ||
"plugins": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"extends": ["plugin:@nx/react", "../../../.eslintrc.json"], | ||
"ignorePatterns": ["!**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"rules": {} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# website-ecosystem-page | ||
|
||
This library was generated with [Nx](https://nx.dev). | ||
|
||
## Running unit tests | ||
|
||
Run `nx test website-ecosystem-page` to execute the unit tests via [Jest](https://jestjs.io). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* eslint-disable */ | ||
export default { | ||
displayName: 'website-ecosystem-page', | ||
preset: '../../../jest.preset.js', | ||
transform: { | ||
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest', | ||
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nx/react/babel'] }], | ||
}, | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], | ||
coverageDirectory: '../../../coverage/libs/website/ecosystem-page', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "website-ecosystem-page", | ||
"$schema": "../../../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "libs/website/ecosystem-page/src", | ||
"projectType": "library", | ||
"tags": [], | ||
"targets": { | ||
"lint": { | ||
"executor": "@nx/linter:eslint", | ||
"outputs": ["{options.outputFile}"], | ||
"options": { | ||
"lintFilePatterns": ["libs/website/ecosystem-page/**/*.{ts,tsx,js,jsx}"] | ||
} | ||
}, | ||
"test": { | ||
"executor": "@nx/jest:jest", | ||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"], | ||
"options": { | ||
"jestConfig": "libs/website/ecosystem-page/jest.config.ts", | ||
"passWithNoTests": true | ||
}, | ||
"configurations": { | ||
"ci": { | ||
"ci": true, | ||
"codeCoverage": true | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
ad08c7f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
staking-app – ./
haqq-staking.vercel.app
staking-app-haqq-network.vercel.app
staking-app-git-dev-haqq-network.vercel.app
ad08c7f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
faucet-app – ./
faucet-app-git-dev-haqq-network.vercel.app
faucet-app-haqq-network.vercel.app
haqq-faucet.vercel.app
testedge2.haqq.network
ad08c7f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
shell-app – ./
shell-app-git-dev-haqq-network.vercel.app
haqq-shell.vercel.app
app.haqq.network
shell-app-haqq-network.vercel.app
ad08c7f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
governance-app – ./
haqq-governance.vercel.app
governance-app-git-dev-haqq-network.vercel.app
governance-app-haqq-network.vercel.app
ad08c7f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
haqq-website – ./
haqq.network
haqq-website.vercel.app
haqq-website-git-dev-haqq-network.vercel.app
haqq-website-haqq-network.vercel.app
ad08c7f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
vesting-app – ./
vesting-app-haqq-network.vercel.app
haqq-vesting.vercel.app
vesting.haqq.network
vesting-app-git-dev-haqq-network.vercel.app