-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR-URL: #645 Co-authored-by: Joe Karow <58997957+JoeKarow@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
- Loading branch information
Showing
56 changed files
with
713 additions
and
276 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
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,53 @@ | ||
import { Center, Grid, Loader, Overlay, Stack, Title } from '@mantine/core' | ||
import { type GetServerSideProps, InferGetServerSidePropsType } from 'next' | ||
import { useRouter } from 'next/router' | ||
import { useSession } from 'next-auth/react' | ||
import { useTranslation } from 'next-i18next' | ||
|
||
import { getServerSession } from '@weareinreach/auth' | ||
import { QuickPromotionModal } from '@weareinreach/ui/modals' | ||
import { getServerSideTranslations } from '~app/utils/i18n' | ||
|
||
const Reviews = () => { | ||
const { t } = useTranslation('common') | ||
const { data: session, status } = useSession() | ||
const router = useRouter() | ||
if (status === 'loading') { | ||
return ( | ||
<Center> | ||
<Loader /> | ||
</Center> | ||
) | ||
} | ||
if (status === 'unauthenticated' || session === null) { | ||
return ( | ||
<Overlay blur={2}> | ||
<QuickPromotionModal autoLaunch onClose={() => router.replace('/')} /> | ||
</Overlay> | ||
) | ||
} | ||
|
||
return ( | ||
<Grid.Col xs={12} sm={12}> | ||
<Stack h='100vh' align='flex-start' w='100%'> | ||
<Title order={2}>{t('words.reviews')}</Title> | ||
<Stack spacing={0} align='center' justify='center' h='100%' w='100%'> | ||
<Title order={2}>🚧</Title> | ||
<Title order={2}>{t('words.coming-soon')}</Title> | ||
</Stack> | ||
</Stack> | ||
</Grid.Col> | ||
) | ||
} | ||
|
||
export const getServerSideProps: GetServerSideProps = async ({ locale, req, res }) => { | ||
const session = await getServerSession({ req, res }) | ||
|
||
return { | ||
props: { | ||
session, | ||
...(await getServerSideTranslations(locale, ['common'])), | ||
}, | ||
} | ||
} | ||
export default Reviews |
File renamed without changes.
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
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 @@ | ||
crowdin/generated/*.json |
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 @@ | ||
import { kv as redis } from '@vercel/kv' | ||
import { Logger } from 'tslog' | ||
|
||
const log = new Logger({ name: 'Cache - Slug to OrgId' }) | ||
|
||
export const readSlugCache = async (slug: string) => { | ||
try { | ||
if ((await redis.ping()) !== 'PONG') { | ||
log.warn('Skipping cache read - Redis client not connected') | ||
return null | ||
} | ||
const organizationId = await redis.hget<string>('slugToOrgId', slug) | ||
return organizationId | ||
} catch (err) { | ||
log.error(err) | ||
return null | ||
} | ||
} | ||
|
||
export const writeSlugCache = async (slug: string, organizationId: string) => { | ||
try { | ||
if ((await redis.ping()) !== 'PONG') { | ||
log.warn('Skipping cache write - Redis client not connected') | ||
return | ||
} | ||
await redis.hset('slugToOrgId', { [slug]: organizationId }) | ||
} catch (err) { | ||
log.error(err) | ||
} | ||
} |
Empty file.
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
Oops, something went wrong.
821acc4
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:
inreach-app – ./apps/app
inreach-app.vercel.app
inreach-app-git-main-weareinreach.vercel.app
inreach-app-weareinreach.vercel.app
app.inreach.org
beta.inreach.org
www.app.inreach.org
admin.inreach.org