Skip to content

Commit

Permalink
Merge branch 'vercel'
Browse files Browse the repository at this point in the history
  • Loading branch information
Amirgh8181 committed Aug 9, 2024
2 parents 98386b0 + 00b6e17 commit 0fab554
Show file tree
Hide file tree
Showing 49 changed files with 179 additions and 129 deletions.
3 changes: 3 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ const withNextIntl = createNextIntlPlugin("./src/config/i18n.ts");

/** @type {import('next').NextConfig} */
const nextConfig = {
env: {
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL,
},
images: {
domains: ["localhost"],
remotePatterns: [
Expand Down
Binary file removed public/images/Clinics/hero-pic.jpg
Binary file not shown.
Binary file added public/images/Clinics/hero-pic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/Shelters/hero-pic.jpg
Binary file not shown.
Binary file added public/images/Shelters/hero-pic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/Shop/hero.jpg
Binary file not shown.
Binary file added public/images/Shop/hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion public/sw.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/actions/SignIn/SignIn.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from "axios";
const url = process.env.BACKEND_SOURCE_URL as string
const url = process.env.NEXT_PUBLIC_API_URL as string
console.log(url);
export async function SignIn({ email, password }: { email: string, password: string }) {
const credentialDetail = { email, password }
Expand Down
2 changes: 1 addition & 1 deletion src/actions/SignUp/signUp.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use server"
import { SignUpDataType } from "@/src/types/AuthInput";
import axios from "axios";
const url = process.env.BACKEND_SOURCE_URL as string
const url = process.env.NEXT_PUBLIC_API_URL as string
console.log(url);

export async function signUpUser(userDetails: SignUpDataType) {
Expand Down
7 changes: 5 additions & 2 deletions src/app/[locale]/Clinics/[clinicpage]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ import ClinicSinglePageRightSide from '@/src/components/ClinicSinglePage/RightSi
import DoctorSection from '@/src/components/ClinicSinglePage/Leftsid/DoctorSection';
import RelationWay from '@/src/components/ClinicSinglePage/Leftsid/RelationWay';
import getClinicItemPage from '@/src/lib/getClinicItemPage';
import { clinicAndSheltersData } from '@/root/types';
import OneLevelBackBtn from '@/src/components/UI/Button/OneLevelBack';

const ClinicPage = async ({ params }: { params: { clinicpage: string } }) => {

const req = await getClinicItemPage(params.clinicpage)
const req: clinicAndSheltersData = await getClinicItemPage(params.clinicpage)
return (
<div className='w-full min-h-screen flex justify-center items-center md:py-[5vmax] py-[7dvh]'>
<div className='w-full min-h-screen flex justify-center items-center md:py-[5vmax] py-[7dvh] relative'>
<OneLevelBackBtn />
<div className='w-[90%] flex flex-col md:flex-row md:justify-between items-center md:items-start mt-6 '>
<div className='md:w-[40%] w-full order-2 md:order-1 flex flex-col items-center space-y-4'>
<DoctorSection clinicData={req} />
Expand Down
7 changes: 4 additions & 3 deletions src/app/[locale]/Clinics/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { Hero } from '@/ui/Hero'
import ClinicAndShelterCard from '@/src/components/UI/clinicAndShelterCard'
import getClinics from '@/src/lib/getClinics';
import mainImg from "@/public/images/Clinics/hero-pic.jpg"
import mainImg from "@/public/images/Clinics/hero-pic.png"
import bgImage from "@/public/images/Clinics/hero bg.jpg"
import { getTranslations } from 'next-intl/server';
import getClinics from '@/src/lib/getClinics';
import { clinicAndSheltersData } from '@/root/types';

const Clinics = async () => {
const req = await getClinics()
const req:clinicAndSheltersData[] = await getClinics()
const t = await getTranslations("Clinic")
return (
<>
Expand Down
21 changes: 13 additions & 8 deletions src/app/[locale]/Shelters/[shelterpage]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
import { clinicAndSheltersData } from '@/root/types';
import SheltersSinglePageLeftSide from '@/src/components/SheltersSinglePage/LeftSide';
import SheltersSinglePageRightSide from '@/src/components/SheltersSinglePage/RightSide';
import OneLevelBackBtn from '@/src/components/UI/Button/OneLevelBack';
import getShelterItemPage from '@/src/lib/getShelterItemPage';


const ShelterPage = async ({ params }: { params: { shelterpage: string } }) => {
const req = await getShelterItemPage(params.shelterpage)
const req: clinicAndSheltersData = await getShelterItemPage(params.shelterpage)
console.log(req);

return (
<div dir='ltr' className='w-[90%] grid grid-cols-1 md:grid-cols-2 gap-4 customGlass rounded-badge mx-auto md:my-[6vmax] mt-[12vmax] mb-[6vmax]'>
<div className='w-full grid grid-cols-1 place-content-center space-y-4 md:order-1 order-2'>
<SheltersSinglePageLeftSide shelterData={req}/>
</div>
<div className='flex flex-col items-center w-full p-4 md:order-2 order-1'>
<SheltersSinglePageRightSide img={req.attachmentFile} />
<div className='w-full relative'>
<OneLevelBackBtn />
<div dir='ltr' className='w-[90%] grid grid-cols-1 md:grid-cols-2 gap-4 customGlass rounded-badge mx-auto md:my-[6vmax] mt-[12vmax] mb-[6vmax]'>
<div className='w-full grid grid-cols-1 place-content-center space-y-4 md:order-1 order-2'>
<SheltersSinglePageLeftSide shelterData={req} />
</div>
<div className='flex flex-col items-center w-full p-4 md:order-2 order-1'>
<SheltersSinglePageRightSide img={req.attachmentFile} />
</div>
</div>
</div>
)
Expand Down
7 changes: 4 additions & 3 deletions src/app/[locale]/Shelters/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import ClinicAndShelterCard from '@/src/components/UI/clinicAndShelterCard'
import getShelters from '@/src/lib/getShelters'
import { Hero } from '@/ui/Hero'
import mainImg from "@/public/images/Shelters/hero-pic.jpg"
import mainImg from "@/public/images/Shelters/hero-pic.png"
import bgImage from "@/public/images/Shelters/hero-bg.jpg"
import { getTranslations } from 'next-intl/server'
import getShelters from '@/src/lib/getShelters'
import { clinicAndSheltersData } from '@/root/types'

const Shelters = async () => {
const req = await getShelters()
const req:clinicAndSheltersData[] = await getShelters()
const t = await getTranslations("Shelter")

return (
Expand Down
Loading

0 comments on commit 0fab554

Please sign in to comment.