-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: π release new app version
- Loading branch information
Showing
25 changed files
with
361 additions
and
208 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
# Briskly | ||
|
||
- Melhorar a UX do fluxo de revisΓ£o de um deck |
8 changes: 8 additions & 0 deletions
8
prisma/migrations/20230207235800_add_next_review_field_to_study_session_box/migration.sql
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,8 @@ | ||
/* | ||
Warnings: | ||
- Added the required column `nextReview` to the `StudySessionBox` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE "StudySessionBox" ADD COLUMN "nextReview" TIMESTAMP(3) NOT NULL; |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,18 +1,16 @@ | ||
import { Button } from '../button' | ||
import { Feedback } from '~/components/feedback' | ||
|
||
import type { ErrorProps } from './deck-card-list.types' | ||
|
||
export function Error(props: ErrorProps) { | ||
const { onRetryPress } = props | ||
|
||
return ( | ||
<div className='m-auto flex max-w-xl flex-col items-center gap-10 p-10 sm:p-20'> | ||
<h2 className='text-center text-xl text-primary-900'> | ||
β Ocorreu um erro ao buscas os seus Decks. Por favor, tente novamente | ||
mais tarde! | ||
</h2> | ||
<Button onClick={onRetryPress} variant='secondary'> | ||
Tentar Novamente | ||
</Button> | ||
</div> | ||
<Feedback | ||
title='Erro inesperado!' | ||
subtitle='Ocorreu um erro ao buscar os seus Decks. Por favor, tente novamente mais tarde!' | ||
buttonLabel='Tentar Novamente' | ||
onButtonClick={onRetryPress} | ||
/> | ||
) | ||
} |
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,62 @@ | ||
import { useRouter } from 'next/router' | ||
|
||
import { Button } from '~/components/button' | ||
import { Image } from '~/components/image' | ||
import { routes } from '~/utils/navigation' | ||
|
||
import type { FeedbackProps } from './feedback.types' | ||
|
||
const isString = (value: unknown): value is string => typeof value === 'string' | ||
|
||
export function Feedback(props: FeedbackProps) { | ||
const { | ||
title, | ||
subtitle, | ||
buttonLabel, | ||
onButtonClick, | ||
shouldHideButton, | ||
customImageSrc, | ||
} = props | ||
|
||
const router = useRouter() | ||
|
||
const handleClick = () => { | ||
if (onButtonClick) { | ||
onButtonClick() | ||
} else { | ||
router.push(routes.home()) | ||
} | ||
} | ||
|
||
const renderButton = () => { | ||
if (shouldHideButton) return null | ||
|
||
return ( | ||
<Button fullWidth onClick={handleClick}> | ||
{buttonLabel || 'Voltar para a pΓ‘gina inicial'} | ||
</Button> | ||
) | ||
} | ||
|
||
return ( | ||
<div className='mx-auto flex max-w-2xl flex-col items-center gap-10 p-2 md:p-5'> | ||
<div className='flex flex-col items-center gap-10 md:flex-row'> | ||
<div className='flex flex-col gap-2 text-center'> | ||
<h1 className='text-2xl font-light text-primary-900 md:text-4xl'> | ||
{isString(title) ? title : title()} | ||
</h1> | ||
<h2 className='text-xl font-extralight md:text-xl'> | ||
{isString(subtitle) ? subtitle : subtitle()} | ||
</h2> | ||
</div> | ||
<Image | ||
width={300} | ||
height={300} | ||
alt={`${subtitle} illustration`} | ||
src={customImageSrc || '/images/petting.svg'} | ||
/> | ||
</div> | ||
{renderButton()} | ||
</div> | ||
) | ||
} |
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,8 @@ | ||
export type FeedbackProps = { | ||
title: (() => JSX.Element) | string | ||
subtitle: (() => JSX.Element) | string | ||
buttonLabel?: string | ||
onButtonClick?: () => void | ||
shouldHideButton?: boolean | ||
customImageSrc?: string | ||
} |
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 @@ | ||
export { Feedback } from './feedback.component' |
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 |
---|---|---|
@@ -1,33 +1,10 @@ | ||
import { useRouter } from 'next/router' | ||
|
||
import { Button } from '~/components/button' | ||
import { Image } from '~/components/image' | ||
import { routes } from '~/utils/navigation' | ||
import { Feedback } from '~/components/feedback' | ||
|
||
export default function FourOhFor() { | ||
const router = useRouter() | ||
|
||
return ( | ||
<div className='mx-auto flex max-w-md flex-col items-center gap-10 p-5'> | ||
<div className='flex flex-col gap-2 text-center'> | ||
<h1 className='text-5xl font-extralight text-primary-900'>Desculpe,</h1> | ||
<h2 className='text-2xl font-extralight'> | ||
nΓ£o foi possΓvel encontrar esta pΓ‘gina. | ||
</h2> | ||
</div> | ||
<Image | ||
src='/images/not-found-illustration.svg' | ||
width={448} | ||
height={297} | ||
alt='404 illustration' | ||
/> | ||
<Button | ||
fullWidth | ||
variant='secondary' | ||
onClick={() => router.push(routes.home())} | ||
> | ||
Voltar para a Home | ||
</Button> | ||
</div> | ||
<Feedback | ||
title='Desculpe,' | ||
subtitle='nΓ£o foi possΓvel encontrar esta pΓ‘gina.' | ||
/> | ||
) | ||
} |
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 |
---|---|---|
@@ -1,35 +1,10 @@ | ||
import { useRouter } from 'next/router' | ||
|
||
import { Button } from '~/components/button' | ||
import { Image } from '~/components/image' | ||
import { routes } from '~/utils/navigation' | ||
import { Feedback } from '~/components/feedback' | ||
|
||
export default function FiveHundred() { | ||
const router = useRouter() | ||
|
||
return ( | ||
<div className='mx-auto flex max-w-md flex-col items-center gap-10 p-5'> | ||
<div className='flex flex-col gap-2 text-center'> | ||
<h1 className='text-4xl font-extralight text-primary-900 md:text-5xl'> | ||
Erro inesperado! | ||
</h1> | ||
<h2 className='text-xl font-extralight md:text-2xl'> | ||
Desculpe, parece que houve um erro inesperado em nosso site. | ||
</h2> | ||
</div> | ||
<Image | ||
src='/images/lost-in-space.svg' | ||
width={448} | ||
height={297} | ||
alt='404 illustration' | ||
/> | ||
<Button | ||
fullWidth | ||
variant='secondary' | ||
onClick={() => router.push(routes.home())} | ||
> | ||
Voltar para a Home | ||
</Button> | ||
</div> | ||
<Feedback | ||
title='Erro inesperado!' | ||
subtitle='Desculpe, parece que houve um erro inesperado em nosso site.' | ||
/> | ||
) | ||
} |
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
Oops, something went wrong.
8c43315
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:
briskly β ./
brisklyapp.vercel.app
briskly-git-main-emiliosheinz.vercel.app
briskly-emiliosheinz.vercel.app