Skip to content

Commit cecfdd7

Browse files
joseglegofforres
andauthored
153 timeline v2 (#160)
Co-authored-by: Felipe Torres (fforres) <[email protected]>
1 parent b1f85e5 commit cecfdd7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1692
-1165
lines changed

.env.development.local

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ NEXT_PUBLIC_CONTENTFUL_API_GRAPHQL=https://graphql.contentful.com/content/v1/spa
33
NEXT_PUBLIC_CONTENTFUL_API_KEY=wTGnaFHcz9McLX2KPwp-6cArrlYRraKrtvhVI3F-_F0
44
NEXT_PUBLIC_CONTENTFUL_IS_PREVIEW=True
55
NEXT_PUBLIC_CONTENTFUL_SPACE_ID=1kfhsqlc8ewi
6-
NEXT_PUBLIC_FLAGSMITH_KEY=i5QQGDMRP642etU9Aawo3y
76
CONTENTFUL_SPACE_ID=1kfhsqlc8ewi
87
NEXT_PUBLIC_API_URL=https://tickets-api-localhost.fly.dev/api/v1
98
NEXT_PUBLIC_WORKER_IMAGE_API=https://tickets-images-worker-localhost.jsconfcl.workers.dev

package-lock.json

Lines changed: 55 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@contentful/rich-text-react-renderer": "^15.12.1",
2323
"@emotion/react": "^11.10.5",
2424
"@emotion/styled": "^11.10.5",
25-
"@next/bundle-analyzer": "^12.1.6",
25+
"@next/bundle-analyzer": "^12.3.4",
2626
"@next/eslint-plugin-next": "^12.1.6",
2727
"@popperjs/core": "^2.11.6",
2828
"@tanstack/query-core": "^4.10.3",
@@ -36,7 +36,6 @@
3636
"date-fns": "^2.29.3",
3737
"date-fns-tz": "^1.3.7",
3838
"feather-icons": "^4.29.0",
39-
"flagsmith": "^3.14.0",
4039
"framer-motion": "^7.6.4",
4140
"google-map-react": "^2.2.0",
4241
"graphql": "^16.3.0",
@@ -49,6 +48,7 @@
4948
"next-sitemap": "^3.1.6",
5049
"polished": "^4.2.2",
5150
"react": "^18.2.0",
51+
"react-countdown": "^2.3.5",
5252
"react-country-flag": "^3.0.2",
5353
"react-div-100vh": "^0.7.0",
5454
"react-dom": "^18.2.0",
@@ -105,7 +105,7 @@
105105
"ts-essentials": "^9.3.0",
106106
"type-fest": "^2.13.0",
107107
"typescript": "^4.9.4",
108-
"vercel": "^28.9.0"
108+
"vercel": "^28.10.0"
109109
},
110110
"license": "MIT"
111111
}

pages/_app.tsx

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import {
55
QueryClient,
66
QueryClientProvider as TanstackQueryProvider,
77
} from "@tanstack/react-query";
8-
import flagsmith from "flagsmith/isomorphic";
9-
import { FlagsmithProvider } from "flagsmith/react";
108
import { Provider as JotaiProvider, useAtomValue } from "jotai";
119
import { any } from "micromatch";
1210
import { NextPage } from "next";
@@ -25,8 +23,7 @@ import { Provider } from "urql";
2523
import { urlQlient } from "../src/graphql/urql";
2624
import { isAuthenticatedAtom } from "../src/helpers/auth";
2725
import { GlobalStyles } from "../styles/globalStyles";
28-
import { jsconfTheme } from "../styles/theme";
29-
// import { PublicTicketPageMetaTags } from "../src/Components/PublicTicketMetatag";
26+
import { jsconfTheme, previaTheme } from "../styles/theme";
3027

3128
const WebSchema = dynamic(
3229
async () => await import("../src/Components/schema/webpage"),
@@ -98,6 +95,7 @@ const AppWithQueryClients = ({
9895
Component: NextPageWithLayout;
9996
pageProps: AppProps["pageProps"];
10097
}) => {
98+
const { pathname } = useRouter();
10199
const [queryClient] = useState(
102100
() =>
103101
new QueryClient({
@@ -114,7 +112,9 @@ const AppWithQueryClients = ({
114112
<Provider value={urlQlient}>
115113
<TanstackQueryProvider client={queryClient}>
116114
<Hydrate state={(pageProps as any).dehydratedState}>
117-
<ThemeProvider theme={jsconfTheme}>
115+
<ThemeProvider
116+
theme={pathname === "/laprevia" ? previaTheme : jsconfTheme}
117+
>
118118
<GlobalStyles />
119119
<Suspense fallback={null}>
120120
<WebSchema />
@@ -131,40 +131,15 @@ const AppWithQueryClients = ({
131131
);
132132
};
133133

134-
// const ticketApiUrl = process.env.NEXT_PUBLIC_WORKER_IMAGE_API!;
135-
136134
function AppWithDataStorage({
137135
Component,
138136
pageProps,
139137
router,
140138
}: AppPropsWithLayout) {
141-
// const ticketId = router.query.id as string;
142-
// const isPublicTicketPage =
143-
// router.pathname.startsWith("/p/ticket/") && ticketId;
144139
return (
145-
<>
146-
{/* {isPublicTicketPage && (
147-
// En Facebook, los meta-tags tienen que poder verse dentro de los
148-
// primero 50kb del HTML descargado. Considerando la cantidad de
149-
// componentes q tenemos, facebook no lee los metatags creados en `/pages/p/ticket/[id]`.
150-
// Por eso, los generamos acá como un 'Best Effort'
151-
<PublicTicketPageMetaTags
152-
ticketApiUrl={ticketApiUrl}
153-
ticketId={ticketId}
154-
/>
155-
)} */}
156-
<JotaiProvider>
157-
<FlagsmithProvider
158-
options={{
159-
environmentID: process.env.NEXT_PUBLIC_FLAGSMITH_KEY,
160-
cacheFlags: true,
161-
}}
162-
flagsmith={flagsmith}
163-
>
164-
<AppWithQueryClients Component={Component} pageProps={pageProps} />
165-
</FlagsmithProvider>
166-
</JotaiProvider>
167-
</>
140+
<JotaiProvider>
141+
<AppWithQueryClients Component={Component} pageProps={pageProps} />
142+
</JotaiProvider>
168143
);
169144
}
170145

pages/auth/logout.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import styled from "@emotion/styled";
2-
import { useFlagsmith } from "flagsmith/react";
32
import { useSetAtom } from "jotai";
43
import type { NextPage } from "next";
54
import { useRouter } from "next/router";
@@ -24,17 +23,13 @@ const StyledBlackWrapp = styled.section`
2423
const GithubAuth: NextPage = () => {
2524
const { isReady, replace } = useRouter();
2625
const setAccessToken = useSetAtom(accessTokenAtom);
27-
const flagsmith = useFlagsmith();
2826

2927
useEffect(() => {
3028
if (isReady) {
31-
if (flagsmith.initialised) {
32-
void flagsmith.logout();
33-
}
3429
setAccessToken(null);
3530
void replace("/tickets");
3631
}
37-
}, [flagsmith, isReady, replace, setAccessToken]);
32+
}, [isReady, replace, setAccessToken]);
3833
return (
3934
<Container>
4035
<StyledBlackWrapp />

0 commit comments

Comments
 (0)