Skip to content

Commit

Permalink
fix shelter name
Browse files Browse the repository at this point in the history
  • Loading branch information
sqwatato committed Aug 20, 2023
1 parent 3a82b15 commit 9c5fd69
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import axios from 'axios'
import Cookies from 'js-cookie'

const api = axios.create({
baseURL: 'http://jaydenl.pythonanywhere.com/api/', // Replace with the URL of your Django API
baseURL: 'http://127.0.0.1:8000/api/', // Replace with the URL of your Django API
headers: {
'Content-Type': 'application/json',
},
Expand Down
12 changes: 10 additions & 2 deletions app/opportunities/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ import PetCard from '@/components/PetCard';
import Image from "next/image";
import api from "@/api";
import Cookies from 'js-cookie'

interface ShelterProp {
url: string;
name: string;
address: string;
city: string;
state: string;
zip_code: string;
phone_number: string;
}
interface PetCardProps {
type: string;
name: string;
Expand All @@ -14,7 +22,7 @@ interface PetCardProps {
gender: string;
size: string;
description: string;
shelter: string;
shelter: ShelterProp;
image: string;
url: string;
}
Expand Down
14 changes: 12 additions & 2 deletions components/PetCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import Image from "next/image";
import ImagePlaceholder from "@/components/ImagePlaceholder";

interface ShelterProp {
url: string;
name: string;
address: string;
city: string;
state: string;
zip_code: string;
phone_number: string;
}

interface PetCardProps {
type: string;
name: string;
Expand All @@ -10,7 +20,7 @@ interface PetCardProps {
gender: string;
size: string;
description: string;
shelter: string;
shelter: ShelterProp;
image: string;
}

Expand All @@ -34,7 +44,7 @@ const PetCard = ({ type, name, species, breed, age, gender, size, description, s
</div>
<div className="px-6 py-4">
<p className="text-gray-700 text-sm">
{shelter}
{shelter.name}
</p>
</div>
</div>
Expand Down

0 comments on commit 9c5fd69

Please sign in to comment.