Skip to content

Commit 0d821a0

Browse files
authored
Merge pull request #29 from UNBiters/register
Register
2 parents 646421e + ecd7a99 commit 0d821a0

62 files changed

Lines changed: 4509 additions & 7319 deletions

Some content is hidden

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

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ yarn-error.log*
2626

2727
# local env files
2828
.env*.local
29-
29+
package-lock.json
3030
# vercel
3131
.vercel
3232

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
44

5+
56
## Getting Started
67

78
First, run the development server:

app/layout.js

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
import NavbarHome from '../components/NavbarHome'
2-
import '../styles/globals.css'
3-
import '../styles/navbar.css'
1+
import NavbarMain from '@/components/NavbarMain'
2+
import Footer from '@/components/Footer'
3+
import '@/styles/globals.css';
4+
import '@/styles/navbar.css';
5+
import '@/styles/card.css';
6+
import '@/styles/login.css';
7+
import '@/styles/t&c.css';
48
import { Inter } from 'next/font/google'
59
const inter = Inter({ subsets: ['latin'] })
610

@@ -11,10 +15,19 @@ export const metadata = {
1115
}
1216

1317
export default function RootLayout({ children }) {
18+
//console.log(window.sessionStorage.getItem('sesion'))
1419
return (
15-
<html lang="en">
16-
<NavbarHome />
17-
<body className={inter.className}>{children}</body>
20+
<html lang="en" suppressHydrationWarning={true}>
21+
<head>
22+
<link href="https://cdnjs.cloudflare.com/ajax/libs/flowbite/1.8.1/flowbite.min.css" rel="stylesheet" />
23+
</head>
24+
<script src="https://cdnjs.cloudflare.com/ajax/libs/flowbite/1.8.1/flowbite.min.js" async></script>
25+
<script src="../path/to/flowbite/dist/flowbite.min.js" async></script>
26+
<body className={inter.className}>
27+
<NavbarMain />
28+
{children}
29+
<Footer />
30+
</body>
1831
</html>
1932
)
2033
}

app/page.js

Lines changed: 153 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,157 @@
1+
'use client'
2+
import React, { useEffect, useState } from 'react';
3+
import CardComent from '@/components/CardComment';
4+
import CardChaza from '@/components/CardChaza';
5+
import Comments from '@/components/Comments';
6+
import Card from '@/components/Card';
7+
import Filter from '@/components/Filter';
8+
import NewPost from '@/components/NewPost';
9+
10+
import client, { myClient } from "@/config/client";
11+
import ModalComments from '@/components/Modal/ModalComments';
12+
import { useSearchParams, useRouter } from 'next/navigation'
13+
import CardReview from '@/components/Cards/CardReview';
14+
15+
16+
async function loadPost() {
17+
try {
18+
var res = await client.get("chazas");
19+
//console.log(res.data.data)
20+
return res.data.data;
21+
} catch (err) {
22+
console.log("err", err);
23+
}
24+
}
25+
126

227
export default function Home() {
28+
const searchParams = useSearchParams()
29+
const idSearch = searchParams.get('id')
30+
const router = useRouter()
31+
const [chazas, setChazas] = useState([])
32+
const [posts, setPosts] = useState([])
33+
useEffect(() => {
34+
35+
client.get(`chazas`, { next: { revalidate: true | 0 | 60 } })
36+
.then((res) => {
37+
if (!res.status == "200") {
38+
throw new Error('Failed to fetch data')
39+
}
40+
setChazas(res.data.data.data)
41+
})
42+
43+
client.get(`publications`, { next: { revalidate: true | 0 | 60 } }).
44+
then((res) => {
45+
46+
if (!res.status == "200") {
47+
throw new Error('Failed to fetch data')
48+
}
49+
setPosts(res.data.data.data)
50+
//if (!posts) return "An error has occurred.";
51+
})
52+
}, [])
53+
54+
//const post = await loadPost()
55+
var comments = [
56+
{
57+
"id": 1,
58+
"review": "¡Este es un comentario genial!",
59+
"urlImagen": "https://www.example.com/imagen1.jpg"
60+
},
61+
{
62+
"id": 2,
63+
"review": "Este es otro comentario genial",
64+
"urlImagen": "https://www.example.com/imagen2.jpg"
65+
},
66+
{
67+
"id": 3,
68+
"review": "¡Esta imagen es increíble!",
69+
"urlImagen": "https://www.example.com/imagen3.jpg"
70+
},
71+
{
72+
"id": 4,
73+
"review": "¡Este es un comentario muy profundo!",
74+
"urlImagen": "https://www.example.com/imagen4.jpg"
75+
},
76+
{
77+
"id": 5,
78+
"review": "¡Esta imagen me hace reír!",
79+
"urlImagen": "https://www.example.com/imagen5.jpg"
80+
},
81+
{
82+
"id": 6,
83+
"review": "¡Esta imagen es muy triste!",
84+
"urlImagen": "https://www.example.com/imagen6.jpg"
85+
},
86+
{
87+
"id": 7,
88+
"review": "¡Esta imagen es muy hermosa!",
89+
"urlImagen": "https://www.example.com/imagen7.jpg"
90+
},
91+
{
92+
"id": 8,
93+
"review": "¡Esta imagen es muy graciosa!",
94+
"urlImagen": "https://www.example.com/imagen8.jpg"
95+
},
96+
{
97+
"id": 9,
98+
"review": "¡Esta imagen es muy inspiradora!",
99+
"urlImagen": "https://www.example.com/imagen9.jpg"
100+
},
101+
{
102+
"id": 10,
103+
"review": "¡Esta imagen es muy creativa!",
104+
"urlImagen": "https://www.example.com/imagen10.jpg"
105+
}
106+
]
3107
return (
4-
<></>
108+
<div id='home' className='grid grid-cols-2'>
109+
{idSearch && (<ModalComments onClose={() => { router.push("/") }} _id={idSearch} />)
110+
111+
}
112+
<Filter className={"formSearch justify-items-center px-3 flex mx-auto text-center"} ></Filter>
113+
<div className='formSearch justify-items-center px-3'>
114+
<form>
115+
<label htmlFor="default-search" className="mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white">Buscar</label>
116+
<div className="relative">
117+
<div className="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none">
118+
<svg className="w-4 h-4 text-gray-500 dark:text-gray-400" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
119+
<path stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z" />
120+
</svg>
121+
</div>
122+
<input type="search" id="default-search" className="block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Search Mockups, Logos..." required />
123+
<button type="submit" className="text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">Buscar</button>
124+
</div>
125+
</form>
126+
127+
</div>
128+
<div className='newpost col-span-2 flex justify-end px-3'>
129+
<NewPost></NewPost>
130+
</div>
131+
<div className="col-span-2 pt-3 CardProfile justify-items-center grid min-[1000px]:grid-cols-2 min-[1300px]:grid-cols-3 min-[1300px]:px-3">
132+
{posts ?
133+
posts.map((card) => (
134+
<>
135+
<CardReview key={"pub" + card._id} card={card} idModal={card._id} comments={card.reviews} className={"ListComment pb-2"} />
136+
</>
137+
)
138+
)
139+
140+
: null}
141+
{chazas ?
142+
chazas.map((chaz) => (
143+
<>
144+
<Card key={"cha" + chaz._id} card={chaz} idModal={chaz._id} comments={comments} className={"ListComment pb-2"}></Card>
145+
</>
146+
)
147+
)
148+
149+
: null}
150+
</div>
151+
<a href="/unbiters/pricing" className="btn-flotante text-white right-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
152+
Explora Premium
153+
</a>
154+
155+
</div>
5156
)
6-
}
157+
}

app/unbiters/about/page.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import Values from "@/components/About/Values";
2+
3+
export default function About() {
4+
return (
5+
<div className="justify-items-center bg-white pt-12 text-center h-full " >
6+
7+
<section className="h-full pt-12 dark:bg-gray-900 content-center">
8+
<div className="text-left py-8 px-4 mx-auto max-w-screen-xl max-h-screen-xl lg:py-16 lg:px-6">
9+
<Values></Values>
10+
</div>
11+
</section>
12+
</div>
13+
)
14+
}

app/unbiters/chazas/page.js

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
import CardComent from '@/components/CardComment';
2+
import CardChaza from '@/components/CardChaza';
3+
import client from "@/config/client";
4+
import Comments from '@/components/Comments';
5+
import Card from '@/components/Card';
6+
import Filter from '@/components/Filter';
7+
import NewPost from '@/components/NewPost';
8+
import { myClient } from "@/config/client";
9+
10+
11+
async function loadPost() {
12+
try {
13+
var res = await client.get("chazas");
14+
await new Promise((resolve) => setTimeout(resolve, 5000))
15+
return res.data.data;
16+
} catch (err) {
17+
//console.log("err", err);
18+
}
19+
}
20+
21+
export default async function Home() {
22+
//const post = (await loadPost())
23+
//console.log(post.data[0])
24+
const res = await client.get(`${myClient.url}chazas`, { next: { revalidate: false | 0 | 300 } })
25+
26+
if (!res.status == "201") {
27+
throw new Error('Failed to fetch data')
28+
}
29+
var chazas = res.data.data.data
30+
if (!chazas) return "An error has occurred.";
31+
//if (isLoading) return "Loading...";
32+
var comments = [
33+
{
34+
"id": 1,
35+
"review": "¡Este es un comentario genial!",
36+
"urlImagen": "https://www.example.com/imagen1.jpg"
37+
},
38+
{
39+
"id": 2,
40+
"review": "Este es otro comentario genial",
41+
"urlImagen": "https://www.example.com/imagen2.jpg"
42+
},
43+
{
44+
"id": 3,
45+
"review": "¡Esta imagen es increíble!",
46+
"urlImagen": "https://www.example.com/imagen3.jpg"
47+
},
48+
{
49+
"id": 4,
50+
"review": "¡Este es un comentario muy profundo!",
51+
"urlImagen": "https://www.example.com/imagen4.jpg"
52+
},
53+
{
54+
"id": 5,
55+
"review": "¡Esta imagen me hace reír!",
56+
"urlImagen": "https://www.example.com/imagen5.jpg"
57+
},
58+
{
59+
"id": 6,
60+
"review": "¡Esta imagen es muy triste!",
61+
"urlImagen": "https://www.example.com/imagen6.jpg"
62+
},
63+
{
64+
"id": 7,
65+
"review": "¡Esta imagen es muy hermosa!",
66+
"urlImagen": "https://www.example.com/imagen7.jpg"
67+
},
68+
{
69+
"id": 8,
70+
"review": "¡Esta imagen es muy graciosa!",
71+
"urlImagen": "https://www.example.com/imagen8.jpg"
72+
},
73+
{
74+
"id": 9,
75+
"review": "¡Esta imagen es muy inspiradora!",
76+
"urlImagen": "https://www.example.com/imagen9.jpg"
77+
},
78+
{
79+
"id": 10,
80+
"review": "¡Esta imagen es muy creativa!",
81+
"urlImagen": "https://www.example.com/imagen10.jpg"
82+
}
83+
]
84+
return (
85+
<div id='home' className='grid grid-cols-2'>
86+
<Filter className={"formSearch justify-items-center px-3 flex mx-auto text-center"} ></Filter>
87+
<div className='formSearch justify-items-center px-3'>
88+
<form>
89+
<label htmlFor="default-search" className="mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white">Search</label>
90+
<div className="relative">
91+
<div className="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none">
92+
<svg className="w-4 h-4 text-gray-500 dark:text-gray-400" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
93+
<path stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z" />
94+
</svg>
95+
</div>
96+
<input type="search" id="default-search" className="block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Search Mockups, Logos..." required />
97+
<button type="submit" className="text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">Search</button>
98+
</div>
99+
</form>
100+
101+
</div>
102+
<div className="col-span-2 pt-3 CardProfile justify-items-center grid min-[1300px]:grid-cols-2 min-[1300px]:px-3">
103+
{chazas ?
104+
chazas.map((card) => (
105+
<Card key={"chaza" + card._id} card={card} idModal={card._id} comments={comments} className={"ListComment pb-2"}></Card>
106+
)
107+
)
108+
109+
: null}
110+
</div>
111+
</div>
112+
)
113+
}

app/unbiters/contactus/page.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
'use client';
2+
export default function ContactUs() {
3+
const handleEmailClick = () => {
4+
window.location.href = "mailto:unbiters@gmail.com";
5+
}
6+
7+
const handleWhatsAppClick = () => {
8+
window.open("https://wa.me/qr/RCGW42NNRI6OK1", "_blank");
9+
}
10+
11+
const handleDiscordClick = () => {
12+
window.open("https://discord.gg/Eece7KnMHq", "_blank");
13+
}
14+
15+
return (
16+
<div className="mt-8">
17+
<div className=" pt-24 pb-24 flex justify-center items-center">
18+
<div className=" max-w-bg mx-auto bg-[#F6EEDF] rounded-xl shadow-md overflow-hidden">
19+
<div className="py-8 lg:py-16 px-4 mx-auto max-w-screen-md text-center">
20+
<h2 className="mb-4 text-4xl tracking-tight font-extrabold text-gray-900 dark:text-white">Contactanos</h2>
21+
<p className=" mb-8 lg:mb-16 font-dark text-gray-800 dark:text-gray-500 sm:text-xl">
22+
¿Tienes alguna duda o problema con nuestra app?
23+
<br />
24+
En UNBiters, nos comprometemos a ofrecer un soporte de alta calidad a nuestros usuarios.
25+
Nuestro equipo de expertos está disponible para ayudarte con cualquier problema que puedas tener con nuestra app.
26+
<br />
27+
</p>
28+
<div className="space-y-4">
29+
<button onClick={handleEmailClick} className="py-3 px-5 ml-2.5 mr-2.5 text-sm font-medium text-center text-white rounded-lg bg-primary-700 sm:w-fit hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800">
30+
Contactar por Correo
31+
</button>
32+
<button onClick={handleWhatsAppClick} className="py-3 px-5 ml-2.5 mr-2.5 text-sm font-medium text-center text-white rounded-lg bg-green-500 sm:w-fit hover:bg-green-700 focus:ring-4 focus:outline-none focus:ring-primary-300 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-primary-800">
33+
Contactar por WhatsApp
34+
</button>
35+
<button onClick={handleDiscordClick} className="py-3 px-5 ml-2.5 mr-2.5 text-sm font-medium text-center text-white rounded-lg bg-purple-500 sm:w-fit hover:bg-purple-700 focus:ring-4 focus:outline-none focus:ring-primary-300 dark:bg-purple-600 dark:hover:bg-purple-700 dark:focus:ring-primary-800">
36+
Unirse a Discord
37+
</button>
38+
</div>
39+
</div>
40+
</div>
41+
</div>
42+
</div>
43+
);
44+
}

0 commit comments

Comments
 (0)