Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into prod
Browse files Browse the repository at this point in the history
  • Loading branch information
darklight9811 committed Sep 23, 2024
2 parents c069471 + c8215f3 commit 57e46dc
Show file tree
Hide file tree
Showing 64 changed files with 973 additions and 317 deletions.
466 changes: 437 additions & 29 deletions LICENSE

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion apps/app/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import createNextIntlPlugin from "next-intl/plugin";
/** @type {import('next').NextConfig} */
const config = {
reactStrictMode: true,
transpilePackages: ["@repo/ds"],
transpilePackages: ["@repo/ds", "@repo/env", "@repo/services", "@repo/schemas", "@repo/shared"],
productionBrowserSourceMaps: true,
async headers() {
return [
Expand Down Expand Up @@ -69,6 +69,11 @@ const config = {
},
],
},
webpack: (config) => {
config.resolve.alias.canvas = false;
config.resolve.alias.encoding = false;
return config;
},
};

const withNextIntl = createNextIntlPlugin();
Expand Down
25 changes: 13 additions & 12 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,37 @@
"postinstall": "cd ../../ && bun run postinstall"
},
"dependencies": {
"@clerk/localizations": "^3.0.1",
"@clerk/nextjs": "^5.5.2",
"@clerk/localizations": "^3.0.4",
"@clerk/nextjs": "^5.6.0",
"@next/third-parties": "^14.2.13",
"@react-pdf/renderer": "^3.4.4",
"@repo/ds": "1.0.0",
"@repo/env": "1.0.0",
"@repo/schemas": "1.0.0",
"@repo/services": "1.0.0",
"@tanstack/react-query": "^5.55.4",
"@tanstack/react-query-devtools": "^5.55.4",
"@upstash/ratelimit": "^2.0.2",
"@tanstack/react-query": "^5.56.2",
"@tanstack/react-query-devtools": "^5.56.2",
"@upstash/ratelimit": "^2.0.3",
"@vercel/analytics": "^1.3.1",
"@vercel/functions": "^1.4.1",
"@vercel/kv": "^2.0.0",
"@vercel/speed-insights": "^1.0.12",
"@yamiassu/shared": "*",
"lucide-react": "^0.439.0",
"next": "^14.2.10",
"next-intl": "^3.19.1",
"lucide-react": "^0.441.0",
"next": "^14.2.13",
"next-intl": "^3.19.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"zod": "^3.23.8"
},
"devDependencies": {
"@repo/config": "0.0.0",
"@types/node": "^22.5.4",
"@types/react": "^18.3.5",
"@types/node": "^22.5.5",
"@types/react": "^18.3.8",
"@types/react-dom": "^18.3.0",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.45",
"tailwindcss": "^3.4.11",
"postcss": "^8.4.47",
"tailwindcss": "^3.4.12",
"typescript": "^5.6.2"
}
}
71 changes: 38 additions & 33 deletions apps/app/src/app/(app)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
AccordionTrigger,
} from "@repo/ds/ui/accordion";
import { buttonVariants } from "@repo/ds/ui/button";
import { Code, Handshake, Users } from "lucide-react";
import { ArrowRight, Code, Handshake, Users } from "lucide-react";
import Image from "next/image";

export default function Page() {
Expand All @@ -16,45 +16,44 @@ export default function Page() {
* ### MARK: Hero
*/}

<div className="flex flex-col justify-center h-full min-h-[800px] md:min-h-[1000px] items-center relative pb-[50vh] px-2 overflow-hidden">
<img
src="/images/arts/splash_01.svg"
alt=""
fetchPriority="high"
className="absolute xl:top-[-40vh] z-[-1] w-full min-w-[840px] bg-cover"
<div className="flex flex-col justify-center min-h-[800px] md:min-h-[1000px] pt-[20vh] items-center relative px-2 overflow-hidden">
<Image
alt="logo"
height={800}
src="/images/logo/blur.webp"
className="absolute top-0 z-[-1] animate-[spin_8s_infinite]"
width={800}
/>

<h1 className="text-3xl md:text-7xl font-bold max-w-screen-xl text-center text-white animate-top-in mb-8">
Reencontre vidas com nossa plataforma inteligente
<h1 className="text-3xl md:text-7xl font-bold max-w-screen-xl text-center animate-top-in mb-8">
Reencontre{" "}
<span className="bg-gradient-to-r from-primary to-[#6FFFE9] text-transparent bg-clip-text">
vidas
</span>{" "}
com nossa plataforma inteligente
</h1>
<h2 className="text-md md:text-2xl font-light text-center text-[#262a41] opacity-0 animation-delay-200 animate-top-in">
A plataforma centralizada para localizar pessoas e animais
desaparecidos com eficiência e colaboração.
</h2>
<img
src="/images/arts/line_01.svg"
alt=""
fetchPriority="high"
className="absolute z-[-1] w-full !top-[50%]"
/>

<Link
href="/profiles"
className={buttonVariants({
className: "mt-8 md:!text-2xl md:!py-8",
variant: "secondary",
className: "my-16",
variant: "dark",
size: "lg",
})}
>
Comece sua busca agora
<ArrowRight className="ml-2" />
</Link>

<Image
src="/screenshot.png"
alt=""
width={1100}
height={679}
className="z-[-1] absolute top-[50%]"
width={1064}
height={568}
className="outline outline-1 outline-input rounded-[32px] outline-offset-8 shadow"
priority
/>
</div>
Expand All @@ -63,7 +62,7 @@ export default function Page() {
* ### MARK: How
*/}

<div className="container mx-auto flex flex-col md:flex-row gap-10">
<div className="container mx-auto flex flex-col md:flex-row gap-10 mt-8">
<div className="w-full sm:w-1/2">
<Image
loading="eager"
Expand Down Expand Up @@ -141,7 +140,7 @@ export default function Page() {
* ### MARK: Action
*/}

<div className="bg-[#62b0f4] my-20">
<div className="bg-secondary my-20">
<div className="container mx-auto flex flex-col gap-10 py-20 items-center">
<h1 className="text-white text-2xl md:text-5xl font-extrabold">
Ajude a encontrar quem está desaparecido
Expand All @@ -155,7 +154,8 @@ export default function Page() {
<Link
href="/sign-up"
className={buttonVariants({
variant: "secondary",
variant: "dark",
size: "lg",
className:
"md:!text-2xl font-bold leading-normal tracking-wide !px-6 !py-6",
})}
Expand All @@ -180,15 +180,21 @@ export default function Page() {
é centralizar e distribuir informações de forma eficiente e acessível.
</p>

<div className="md:mx-16 rounded-3xl bg-gradient-to-l from-[#6FFFE9] to-[#62B0F4] my-16 flex justify-center items-center py-4 md:py-12">
<Image src="/screenshot.png" alt="" width={1100} height={735} />
<div className="mx-auto rounded-[32px] bg-gradient-to-l from-[#6FFFE9] to-[#62B0F4] my-16 flex justify-center items-center p-2 md:p-4">
<Image
src="/screenshot.png"
alt=""
width={1064}
height={568}
className="rounded-[24px] overflow-hidden w-full"
/>
</div>

<div className="flex flex-wrap justify-evenly my-8 gap-4">
<div className="flex flex-col items-center max-w-xs">
<Users size="64" />

<h2 className="font-semibold text-xl">Comunidade</h2>
<h2 className="font-semibold text-xl mb-4">Comunidade</h2>

<p className="text-justify">
Nós estamos aqui graças àqueles que nos ajudam. A comunidade é a
Expand All @@ -200,7 +206,7 @@ export default function Page() {
<div className="flex flex-col items-center max-w-xs">
<Code size="64" />

<h2 className="font-semibold text-xl">Código aberto</h2>
<h2 className="font-semibold text-xl mb-4">Código aberto</h2>

<p className="text-justify">
Nosso código está inteiramente disponível e aberto para
Expand All @@ -212,7 +218,7 @@ export default function Page() {
<div className="flex flex-col items-center max-w-xs">
<Handshake size="64" />

<h2 className="font-semibold text-xl">Parceiros</h2>
<h2 className="font-semibold text-xl mb-4">Parceiros</h2>

<p className="text-justify">
Nossos parceiros nos permitem ir mais longe. Graças a essas
Expand All @@ -228,7 +234,7 @@ export default function Page() {
* ### MARK: Report
*/}

<div className="bg-[#62b0f4] text-slate-900 mb-28">
<div className="bg-foreground text-white mb-28">
<div className="mx-auto container flex flex-col-reverse md:flex-row my-[10vh] relative px-4">
<div className="w-full md:w-1/2 grow flex flex-col justify-center">
<p className="text-2xl font-normal">
Expand Down Expand Up @@ -340,9 +346,8 @@ export default function Page() {
<Link
href="/sign-up"
className={buttonVariants({
variant: "secondary",
className:
"md:!text-2xl font-bold leading-normal tracking-wide !px-6 !py-6",
variant: "dark",
size: "lg",
})}
>
Faça parte da solução
Expand Down
56 changes: 35 additions & 21 deletions apps/app/src/app/(app)/profiles/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Banner from "@/modules/profile/components/banner";
import { ContactDialog } from "@/modules/profile/dialogs/contact-dialog";
import ReportDialog from "@/modules/report/dialogs/report-dialog";
import { currentUser } from "@/modules/user/loaders";
import { GoogleMapsEmbed } from "@next/third-parties/google";
import { Avatar, AvatarFallback, AvatarImage } from "@repo/ds/ui/avatar";
import { Button, buttonVariants } from "@repo/ds/ui/button";
import { Carousel, CarouselContent, CarouselItem } from "@repo/ds/ui/carousel";
Expand All @@ -17,7 +18,6 @@ import {
CircleAlert,
Edit,
Flag,
MapPinned,
Printer,
Share2,
Trash,
Expand Down Expand Up @@ -119,16 +119,22 @@ export default async function Page({ params }: { params: { id: string } }) {

<div className="flex gap-2 mt-4">
<ContactDialog contact={data.contact}>
<Button className="w-full">{t("found")}</Button>
<Button className="w-full" variant="dark">
{t("found")}
</Button>
</ContactDialog>
<Tooltip>
{!canReport && (
{!canReport ? (
<TooltipContent>{t("already_reported")}</TooltipContent>
)}
) : null}
<TooltipTrigger asChild>
<div>
<ReportDialog data={{ id_profile: data.id }}>
<Button variant="destructive" disabled={!canReport}>
<Button
variant="destructive"
size="icon"
disabled={!canReport}
>
<Flag />
</Button>
</ReportDialog>
Expand All @@ -142,19 +148,24 @@ export default async function Page({ params }: { params: { id: string } }) {
link={`${baseUrl()}/profiles/${data.id}`}
description={t("help", { profile: data.name })}
>
<Button size="icon">
<Button size="icon" variant="dark">
<Share2 />
</Button>
</Share>
<Banner
images={data.pictures.map((t) => t.id)}
description={data.description}
contact={data.contact?.options as { type: string; value: string }[]}
>
<Button size="icon">
<Printer />
</Button>
</Banner>
{data.pictures.length > 0 &&
(data.contact?.options as unknown[])?.length > 1 && (
<Banner
images={data.pictures.map((t) => t.id)}
description={data.description}
contact={
data.contact?.options as { type: string; value: string }[]
}
>
<Button size="icon" variant="dark">
<Printer />
</Button>
</Banner>
)}
{user?.id === data.user_created.id && (
<>
<Link
Expand Down Expand Up @@ -253,12 +264,15 @@ export default async function Page({ params }: { params: { id: string } }) {
</div>

<div className="w-full sm:w-1/2 aspect-video relative">
<Image alt="" src="/images/placeholder/maps.webp" fill />

<div className="absolute top-0 left-0 w-full h-full bg-black/50 flex flex-col justify-center items-center text-white">
<MapPinned size={64} />
<h1 className="text-xl">Mapas em breve</h1>
</div>
<GoogleMapsEmbed
apiKey={env.GOOGLE_KEY}
width="100%"
height={350}
style=".place-card { display: none; }"
loading="eager"
mode="place"
q={`${data.addresses[0]?.district},${data.addresses[0]?.city},${data.addresses[0]?.state}`}
/>
</div>
</div>
</>
Expand Down
8 changes: 4 additions & 4 deletions apps/app/src/app/(app)/profiles/_components/filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function Filter(props: Props) {

return (
<Form
className="bg-white *:m-0 p-2 rounded-lg shadow flex gap-4 flex-col sticky top-[67px]"
className="bg-white *:m-0 p-2 rounded-lg flex gap-4 flex-col sticky top-[72px]"
data={{
...props.data,
date_disappeared: parseToDate(props.data?.date_disappeared as string),
Expand Down Expand Up @@ -62,13 +62,13 @@ export function Filter(props: Props) {
render={({ field }) => <CalendarInput mode="range" {...field} />}
/>

<div className="flex gap-2">
<Button type="submit" className="w-full">
<div className="flex gap-2 pt-2">
<Button type="submit" className="w-full" variant="dark">
Aplicar
</Button>
<Button
size="icon"
variant="destructive"
variant="outline-destructive"
className="px-2"
onClick={() => {
const url = new URL(window.location.href);
Expand Down
Loading

0 comments on commit 57e46dc

Please sign in to comment.