-
Notifications
You must be signed in to change notification settings - Fork 0
Feat(frontend): add footer and revert graffle to graph-ql #11
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
47565a4
feat(frontend): revert graffle to graphql-request and add footer
alcercu 021086c
chore: update yarn lock
alcercu d427f84
chore(frontend): add clsx for className management
alcercu da0205f
feat(frontend): add call to action footer
alcercu 7555c04
chore(frontend): re-order imports
alcercu afaf543
Merge branch 'master' into feat(frontend)/add-footer
alcercu 9d86a47
refactor(frontend): fix line length
alcercu 7d70c26
feat(frontend): add scale up animation to links
alcercu 2aafc6d
fix(frontend): use CamelCase for type names
alcercu f1ffb63
feat(frontend): add hover animation to Button
alcercu 32ffbfb
fix(frontend): use semantically correct html tags
alcercu adfbb8a
Update frontend/src/components/Footer.tsx
alcercu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,24 @@ | ||
| import React from "react"; | ||
|
|
||
| import clsx from "clsx"; | ||
|
|
||
| interface IButton { | ||
| children: React.ReactNode; | ||
| onClick?: () => void; | ||
| className?: string; | ||
| } | ||
|
|
||
| const Button: React.FC<IButton> = ({ children, onClick, className }) => ( | ||
| <button | ||
| className={ | ||
| clsx( | ||
| "bg-primary-blue py-2 px-8 rounded-full", | ||
| "hover:bg-primary-blue/90 transition duration-75", | ||
| className)} | ||
| {...{ onClick }} | ||
| > | ||
| {children} | ||
| </button> | ||
| ); | ||
|
|
||
| export default Button; | ||
This file contains hidden or 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 hidden or 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,38 @@ | ||
| import React from "react"; | ||
|
|
||
| import Image from "next/image"; | ||
|
|
||
| import { PartnersQueryType } from "@/queries/partners"; | ||
|
|
||
| interface ITrustedBy { | ||
| partnersData: PartnersQueryType | ||
| } | ||
|
|
||
| const TrustedBy: React.FC<ITrustedBy> = ({ partnersData }) => { | ||
| const partners = partnersData.partners; | ||
| return ( | ||
| <div className="bg-background-2 py-4 px-6"> | ||
| <p className="text-2xl mx-auto w-max mb-2 text-secondary-text"> | ||
| Trusted By | ||
| </p> | ||
| <div className="flex gap-2"> | ||
| {partners.map(({ name, icon_svg }) => | ||
| <div | ||
| key={name} | ||
| className={ | ||
| "bg-white h-16 w-16 rounded-full flex justify-center items-center" | ||
| } | ||
| > | ||
| <Image | ||
| src={icon_svg.url} | ||
| alt={name} | ||
| width="42" | ||
| height="42" | ||
| /> | ||
| </div> | ||
| )} | ||
alcercu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </div> | ||
alcercu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </div> | ||
| ) | ||
| } | ||
| export default TrustedBy; | ||
This file contains hidden or 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 hidden or 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,61 @@ | ||
| import { gql } from "graphql-request"; | ||
|
|
||
| export const footerQuery = gql` | ||
| { | ||
| footerLinksSection { | ||
| Section { | ||
| title | ||
| links { | ||
| name | ||
| url | ||
| } | ||
| } | ||
| } | ||
| footerSocialsSection { | ||
| socials { | ||
| name, | ||
| url, | ||
| icon_white { | ||
| url | ||
| } | ||
| } | ||
| } | ||
| footerSubscribeCta { | ||
| logo { | ||
| url | ||
| } | ||
| notice | ||
| cta_text | ||
| cta_button | ||
| } | ||
| } | ||
| `; | ||
|
|
||
| export type FooterQueryType = { | ||
| footerLinksSection: { | ||
| Section: { | ||
| title: string, | ||
| links: { | ||
| name: string, | ||
| url: string, | ||
| }[], | ||
| }[], | ||
| }, | ||
| footerSocialsSection: { | ||
| socials: { | ||
| name: string, | ||
| url: string, | ||
| icon_white: { | ||
| url: string | ||
| }, | ||
| }[], | ||
| }, | ||
| footerSubscribeCta: { | ||
| logo: { | ||
| url: string | ||
| }, | ||
| notice: string, | ||
| cta_text: string, | ||
| cta_button: string, | ||
| }, | ||
| }; |
This file contains hidden or 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,21 @@ | ||
| import { gql } from "graphql-request"; | ||
|
|
||
| export const partnersQuery = gql` | ||
| { | ||
| partners { | ||
| name | ||
| icon_svg { | ||
| url | ||
| } | ||
| } | ||
| } | ||
| `; | ||
|
|
||
| export type PartnersQueryType = { | ||
| partners: { | ||
| name: string, | ||
| icon_svg: { | ||
| url: string | ||
| } | ||
| }[] | ||
| }; |
This file contains hidden or 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,14 +1,15 @@ | ||
| import { Graffle } from "@/graffle/__.js"; | ||
| import { GraphQLClient } from "graphql-request"; | ||
|
|
||
| import { getStrapiURL } from "@/utils/getStrapiURL"; | ||
|
|
||
| const endpoint = getStrapiURL("/graphql"); | ||
|
|
||
| const token = process.env.STRAPI_TOKEN; | ||
|
|
||
| export const graffle = Graffle.create({ | ||
| schema: endpoint, | ||
| transport: { | ||
| headers: { Authorization: `Bearer ${token}` }, | ||
| }, | ||
| }); | ||
| export const graphQLClient = new GraphQLClient( | ||
| endpoint, | ||
| { | ||
| headers: { Authorization: `Bearer ${token}` } | ||
| } | ||
| ); | ||
alcercu marked this conversation as resolved.
Show resolved
Hide resolved
alcercu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.