Skip to content

Commit a37b5be

Browse files
authored
Feat/workshops n events comments 3 (#210)
1 parent a0a4f75 commit a37b5be

10 files changed

+337
-31
lines changed

graphql.schema.json

+221
Original file line numberDiff line numberDiff line change
@@ -12005,6 +12005,31 @@
1200512005
"isDeprecated": false,
1200612006
"deprecationReason": null
1200712007
},
12008+
{
12009+
"name": "iconName",
12010+
"description": null,
12011+
"args": [
12012+
{
12013+
"name": "locale",
12014+
"description": null,
12015+
"type": {
12016+
"kind": "SCALAR",
12017+
"name": "String",
12018+
"ofType": null
12019+
},
12020+
"defaultValue": null,
12021+
"isDeprecated": false,
12022+
"deprecationReason": null
12023+
}
12024+
],
12025+
"type": {
12026+
"kind": "SCALAR",
12027+
"name": "String",
12028+
"ofType": null
12029+
},
12030+
"isDeprecated": false,
12031+
"deprecationReason": null
12032+
},
1200812033
{
1200912034
"name": "isBlank",
1201012035
"description": null,
@@ -12333,6 +12358,98 @@
1233312358
"isDeprecated": false,
1233412359
"deprecationReason": null
1233512360
},
12361+
{
12362+
"name": "iconName",
12363+
"description": null,
12364+
"type": {
12365+
"kind": "SCALAR",
12366+
"name": "String",
12367+
"ofType": null
12368+
},
12369+
"defaultValue": null,
12370+
"isDeprecated": false,
12371+
"deprecationReason": null
12372+
},
12373+
{
12374+
"name": "iconName_contains",
12375+
"description": null,
12376+
"type": {
12377+
"kind": "SCALAR",
12378+
"name": "String",
12379+
"ofType": null
12380+
},
12381+
"defaultValue": null,
12382+
"isDeprecated": false,
12383+
"deprecationReason": null
12384+
},
12385+
{
12386+
"name": "iconName_exists",
12387+
"description": null,
12388+
"type": {
12389+
"kind": "SCALAR",
12390+
"name": "Boolean",
12391+
"ofType": null
12392+
},
12393+
"defaultValue": null,
12394+
"isDeprecated": false,
12395+
"deprecationReason": null
12396+
},
12397+
{
12398+
"name": "iconName_in",
12399+
"description": null,
12400+
"type": {
12401+
"kind": "LIST",
12402+
"name": null,
12403+
"ofType": {
12404+
"kind": "SCALAR",
12405+
"name": "String",
12406+
"ofType": null
12407+
}
12408+
},
12409+
"defaultValue": null,
12410+
"isDeprecated": false,
12411+
"deprecationReason": null
12412+
},
12413+
{
12414+
"name": "iconName_not",
12415+
"description": null,
12416+
"type": {
12417+
"kind": "SCALAR",
12418+
"name": "String",
12419+
"ofType": null
12420+
},
12421+
"defaultValue": null,
12422+
"isDeprecated": false,
12423+
"deprecationReason": null
12424+
},
12425+
{
12426+
"name": "iconName_not_contains",
12427+
"description": null,
12428+
"type": {
12429+
"kind": "SCALAR",
12430+
"name": "String",
12431+
"ofType": null
12432+
},
12433+
"defaultValue": null,
12434+
"isDeprecated": false,
12435+
"deprecationReason": null
12436+
},
12437+
{
12438+
"name": "iconName_not_in",
12439+
"description": null,
12440+
"type": {
12441+
"kind": "LIST",
12442+
"name": null,
12443+
"ofType": {
12444+
"kind": "SCALAR",
12445+
"name": "String",
12446+
"ofType": null
12447+
}
12448+
},
12449+
"defaultValue": null,
12450+
"isDeprecated": false,
12451+
"deprecationReason": null
12452+
},
1233612453
{
1233712454
"name": "isBlank",
1233812455
"description": null,
@@ -12875,6 +12992,18 @@
1287512992
"isDeprecated": false,
1287612993
"deprecationReason": null
1287712994
},
12995+
{
12996+
"name": "iconName_ASC",
12997+
"description": null,
12998+
"isDeprecated": false,
12999+
"deprecationReason": null
13000+
},
13001+
{
13002+
"name": "iconName_DESC",
13003+
"description": null,
13004+
"isDeprecated": false,
13005+
"deprecationReason": null
13006+
},
1287813007
{
1287913008
"name": "isBlank_ASC",
1288013009
"description": null,
@@ -39481,6 +39610,98 @@
3948139610
"isDeprecated": false,
3948239611
"deprecationReason": null
3948339612
},
39613+
{
39614+
"name": "iconName",
39615+
"description": null,
39616+
"type": {
39617+
"kind": "SCALAR",
39618+
"name": "String",
39619+
"ofType": null
39620+
},
39621+
"defaultValue": null,
39622+
"isDeprecated": false,
39623+
"deprecationReason": null
39624+
},
39625+
{
39626+
"name": "iconName_contains",
39627+
"description": null,
39628+
"type": {
39629+
"kind": "SCALAR",
39630+
"name": "String",
39631+
"ofType": null
39632+
},
39633+
"defaultValue": null,
39634+
"isDeprecated": false,
39635+
"deprecationReason": null
39636+
},
39637+
{
39638+
"name": "iconName_exists",
39639+
"description": null,
39640+
"type": {
39641+
"kind": "SCALAR",
39642+
"name": "Boolean",
39643+
"ofType": null
39644+
},
39645+
"defaultValue": null,
39646+
"isDeprecated": false,
39647+
"deprecationReason": null
39648+
},
39649+
{
39650+
"name": "iconName_in",
39651+
"description": null,
39652+
"type": {
39653+
"kind": "LIST",
39654+
"name": null,
39655+
"ofType": {
39656+
"kind": "SCALAR",
39657+
"name": "String",
39658+
"ofType": null
39659+
}
39660+
},
39661+
"defaultValue": null,
39662+
"isDeprecated": false,
39663+
"deprecationReason": null
39664+
},
39665+
{
39666+
"name": "iconName_not",
39667+
"description": null,
39668+
"type": {
39669+
"kind": "SCALAR",
39670+
"name": "String",
39671+
"ofType": null
39672+
},
39673+
"defaultValue": null,
39674+
"isDeprecated": false,
39675+
"deprecationReason": null
39676+
},
39677+
{
39678+
"name": "iconName_not_contains",
39679+
"description": null,
39680+
"type": {
39681+
"kind": "SCALAR",
39682+
"name": "String",
39683+
"ofType": null
39684+
},
39685+
"defaultValue": null,
39686+
"isDeprecated": false,
39687+
"deprecationReason": null
39688+
},
39689+
{
39690+
"name": "iconName_not_in",
39691+
"description": null,
39692+
"type": {
39693+
"kind": "LIST",
39694+
"name": null,
39695+
"ofType": {
39696+
"kind": "SCALAR",
39697+
"name": "String",
39698+
"ofType": null
39699+
}
39700+
},
39701+
"defaultValue": null,
39702+
"isDeprecated": false,
39703+
"deprecationReason": null
39704+
},
3948439705
{
3948539706
"name": "isBlank",
3948639707
"description": null,

pages/index.tsx

+4-15
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ import styled from "@emotion/styled";
22
import type { NextPage } from "next";
33
import { lazy, Suspense } from "react";
44

5+
import Banner from "../src/Components/BannerComponent";
6+
import FlagMessage, { Message } from "../src/Components/FlagMessage";
57
import Seo from "../src/Components/Seo";
68
import StickContainer from "../src/Components/StickContainer";
79
import EventSchema from "../src/Components/schema/event";
810
import Hero from "../src/Components/sections/Hero";
9-
1011
import {
1112
HomeQueryDocument,
1213
HomeQueryQuery,
@@ -57,15 +58,6 @@ export interface PageProps {
5758
flags: Page["flags"];
5859
}
5960

60-
const Banner = styled.div`
61-
background-color: ${({ theme }) => theme.colors.jsconfRed};
62-
color: white;
63-
margin: 0 auto;
64-
width: 90%;
65-
font-size: 2rem;
66-
padding: 16px;
67-
`;
68-
6961
const Container = styled.section`
7062
display: flex;
7163
flex-direction: column;
@@ -117,11 +109,8 @@ const Home: NextPage<PageProps> = (props: PageProps) => {
117109
{props.flags?.messages ? (
118110
<StickContainer>
119111
<Banner>
120-
{props.flags?.messages?.map((message: string) => (
121-
<div
122-
key={message}
123-
dangerouslySetInnerHTML={{ __html: message }}
124-
/>
112+
{props.flags?.messages?.map((message: Message) => (
113+
<FlagMessage key={message.message} message={message} />
125114
))}
126115
</Banner>
127116
</StickContainer>

pages/link-tree.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ import styled from "@emotion/styled";
22
import type { NextPage } from "next";
33
import { useEffect } from "react";
44

5+
import Icon from "../src/Components/Icon";
56
import Seo from "../src/Components/Seo";
67
import JSConfLogo from "../src/Components/svgs/logo";
8+
79
import {
810
LinkTreeDocument,
911
LinkTreeQuery,
@@ -13,6 +15,7 @@ import { ParseQuery } from "../src/helpers/types";
1315
import { ViewportSizes } from "../styles/theme";
1416

1517
type Page = ParseQuery<LinkTreeQuery["page"]>;
18+
1619
export interface PageProps {
1720
seo: Page["seo"];
1821
heroData: Page["heroBlock"];
@@ -144,7 +147,7 @@ const Home: NextPage<PageProps> = ({
144147
<br />
145148
{links.map((link) => (
146149
<A key={link.link} href={link.link}>
147-
{link.contenido}
150+
<Icon name={link.iconName} /> {link.contenido}
148151
</A>
149152
))}
150153
</Hero>

pages/tickets/index.tsx

+4-15
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
import styled from "@emotion/styled";
21
import { useQuery } from "@tanstack/react-query";
32
import { useAtomValue, useSetAtom } from "jotai";
43

4+
import Banner from "../../src/Components/BannerComponent";
55
import {
66
availableTicketsAtom,
77
ticketsAtom,
88
Entrada,
99
} from "../../src/Components/Cart/CartAtom";
1010
import { CartContainer } from "../../src/Components/Cart/CartContainer";
11+
import FlagMessage, { Message } from "../../src/Components/FlagMessage";
1112
import { DefaultPageLayout } from "../../src/Components/Layouts/DefaultPagelayout";
1213
import Seo from "../../src/Components/Seo";
1314
import StickContainer from "../../src/Components/StickContainer";
@@ -34,15 +35,6 @@ export interface PageProps {
3435
flags: Page["flags"];
3536
}
3637

37-
const Banner = styled.div`
38-
background-color: ${({ theme }) => theme.colors.jsconfRed};
39-
color: white;
40-
margin: 0 auto;
41-
width: 90%;
42-
font-size: 2rem;
43-
padding: 16px;
44-
`;
45-
4638
const image =
4739
"https://images.ctfassets.net/1kfhsqlc8ewi/EAE7GIGq6Uk26KmdTC9T6/00be1cabc2d9b1dea800dbdb7e31c1bd/ticket.png";
4840

@@ -95,11 +87,8 @@ export default function Tickets(props: PageProps) {
9587
{props.flags?.messages ? (
9688
<StickContainer>
9789
<Banner>
98-
{props.flags?.messages?.map((message: string) => (
99-
<div
100-
key={message}
101-
dangerouslySetInnerHTML={{ __html: message }}
102-
/>
90+
{props.flags?.messages?.map((message: Message) => (
91+
<FlagMessage key={message.message} message={message} />
10392
))}
10493
</Banner>
10594
</StickContainer>

0 commit comments

Comments
 (0)