File tree Expand file tree Collapse file tree 6 files changed +28
-97
lines changed Expand file tree Collapse file tree 6 files changed +28
-97
lines changed Original file line number Diff line number Diff line change 1111 "prepare" : " cd .. && husky frontend/.husky"
1212 },
1313 "dependencies" : {
14+ "@opentelemetry/api" : " ^1.9.0" ,
15+ "es-toolkit" : " ^1.25.2" ,
16+ "graffle" : " ^8.0.0-next.75" ,
1417 "graphql" : " ^16.9.0" ,
15- "graphql-request" : " ^7.1.0" ,
1618 "next" : " 14.2.8" ,
1719 "react" : " ^18" ,
1820 "react-dom" : " ^18"
Original file line number Diff line number Diff line change @@ -2,9 +2,13 @@ import React from "react";
22
33import Image from "next/image" ;
44
5- import { Social } from "@/pages/ queries" ;
5+ import { socialsQueryType } from "@/queries/socials " ;
66
7- const Footer : React . FC < { socials : Social [ ] } > = ( { socials } ) => {
7+ interface IFooter {
8+ socials : socialsQueryType [ "socials" ] ;
9+ }
10+
11+ const Footer : React . FC < IFooter > = ( { socials } ) => {
812 return (
913 < div className = {
1014 "py-4 bg-gradient-to-b from-light-blue to-30% to-kleros-purple"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11import Footer from "@/components/Footer" ;
2- import { graphQLClient } from "@/utils/graphQLClient" ;
2+ import TrustedBy from "@/components/TrustedBy" ;
3+ import { partnersQuery , partnersQueryType } from "@/queries/partners" ;
4+ import { socialsQuery , socialsQueryType } from "@/queries/socials" ;
35
4- import TrustedBy from "./components/TrustedBy" ;
5- import {
6- partnersQueryDocument ,
7- Partner ,
8- Social ,
9- footerQueryDocument ,
10- } from "./queries" ;
6+ interface IHome {
7+ partners : partnersQueryType [ "partners" ] ;
8+ socials : socialsQueryType [ "socials" ] ;
9+ }
1110
12- const Home : React . FC < { partners : Partner [ ] ; socials : Social [ ] } > = (
13- { partners, socials }
14- ) => {
11+ const Home : React . FC < IHome > = ( { partners, socials } ) => {
1512 return (
1613 < div >
1714 < TrustedBy { ...{ partners } } />
@@ -21,14 +18,12 @@ const Home: React.FC<{ partners: Partner[]; socials: Social[] }> = (
2118}
2219
2320export const getStaticProps = async ( ) => {
24- const partnersData : { partners : Partner [ ] } =
25- await graphQLClient . request ( partnersQueryDocument , { } ) ;
26- const socialsData : { socials : Social [ ] } =
27- await graphQLClient . request ( footerQueryDocument , { } ) ;
21+ const { partners } = await partnersQuery . run ( ) ;
22+ const { socials } = await socialsQuery . run ( ) ;
2823 return {
2924 props : {
30- partners : partnersData ?. partners ,
31- socials : socialsData ?. socials
25+ partners,
26+ socials,
3227 }
3328 } ;
3429} ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- import { GraphQLClient } from "graphql-request" ;
2-
1+ import { Graffle } from "@/graffle/__.js" ;
32import { getStrapiURL } from "@/utils/getStrapiURL" ;
43
54const endpoint = getStrapiURL ( "/graphql" ) ;
65
76const token = process . env . STRAPI_TOKEN ;
87
9- export const graphQLClient = new GraphQLClient (
10- endpoint ,
11- {
12- headers : { Authorization : `Bearer ${ token } ` }
13- }
14- ) ;
8+ export const graffle = Graffle . create ( {
9+ schema : endpoint ,
10+ transport : {
11+ headers : { Authorization : `Bearer ${ token } ` } ,
12+ } ,
13+ } ) ;
1514
You can’t perform that action at this time.
0 commit comments