Skip to content

Commit

Permalink
this is the last commit in this repo
Browse files Browse the repository at this point in the history
  • Loading branch information
fonelane committed Oct 20, 2023
1 parent 7f2a068 commit 44c8cff
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 25 deletions.
4 changes: 2 additions & 2 deletions client/src/components/Accessories/Accessories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ function Accessories() {
useEffect(() => {
const fetchData = async () => {
try {
// const res = await axios.get(`http://localhost:1337/api/iphones`, {
// const res = await axios.get(`http://193.203.161.234:1337/api/iphones`, {
const res = await axios.get(
`http://localhost:1337/api/covers?populate=*`,
`http://193.203.161.234:1337/api/covers?populate=*`,
{
headers: {
Authorization:
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Accessories/CoverContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function CoverContent({ cIndex }) {
const fetchData = async () => {
try {
const res = await axios.get(
`http://localhost:1337/api/covers/${cIndex}?populate=*`,
`http://193.203.161.234:1337/api/covers/${cIndex}?populate=*`,
{
headers: {
Authorization:
Expand All @@ -34,7 +34,7 @@ function CoverContent({ cIndex }) {
const fetchData = async () => {
try {
const res = await axios.get(
`http://localhost:1337/api/covers/${cIndex}`,
`http://193.203.161.234:1337/api/covers/${cIndex}`,
{
headers: {
Authorization:
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Navigation/Navbar/Search.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function Search({ className, setResults }) {
const [isInputFocused, setInputFocused] = useState(false);
const [input, setInput] = useState("");
const fetchData = (value) => {
fetch(`http://localhost:1337/api/deal-of-the-day-2s?populate=*`, {
fetch(`http://193.203.161.234:1337/api/deal-of-the-day-2s?populate=*`, {
headers: {
Authorization:
"bearer " +
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/ProductCard/CardContent/CardContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function CardContent({ pIndex }) {
const fetchData = async () => {
try {
const res = await axios.get(
`http://localhost:1337/api/deal-of-the-day-2s/${pIndex}?populate=*`,
`http://193.203.161.234:1337/api/deal-of-the-day-2s/${pIndex}?populate=*`,
{
headers: {
Authorization:
Expand All @@ -36,7 +36,7 @@ function CardContent({ pIndex }) {
const fetchData = async () => {
try {
const res = await axios.get(
`http://localhost:1337/api/deal-of-the-day-2s/${pIndex}`,
`http://193.203.161.234:1337/api/deal-of-the-day-2s/${pIndex}`,
{
headers: {
Authorization:
Expand All @@ -57,7 +57,7 @@ function CardContent({ pIndex }) {
// useEffect(() => {
// const fetchData = async () => {
// try {
// const res = await axios.get(`http://localhost:1337/api/apples/${pIndex}`, {
// const res = await axios.get(`http://193.203.161.234:1337/api/apples/${pIndex}`, {
// headers: {
// Authorization: "bearer " + "2ec30f082320c496ed24bc7722585cefc1b1078e6b32f5b77f5de157190641ef31ba5b3d4ddab8b53b227e7be72750200641d55f6c00f4190df68656dee12f8acf40d16712faf76f49ca4348826da57778fff1c384e5b96867a2a52bf64e2d31b90d712528ed1117b68326f2fd7a36caacfe37260b8f923f032bc62d791a8119",
// },
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/ProductCard/ProductCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import axios from "axios";
import Scroll from "../scroll/Scroll";

function FirstCard() {
// const cmsApiUrl = http://localhost:1337;
// const cmsApiUrl = http://193.203.161.234:1337;
// const ApiUrl = import.meta.env.RENDER_BACKEND_URL;
const isMobile = useMediaQuery({ maxWidth: 550 });
const isTablet2 = useMediaQuery({ maxWidth: 768 });
Expand All @@ -36,9 +36,9 @@ function FirstCard() {
useEffect(() => {
const fetchData = async () => {
try {
// const res = await axios.get(`http://localhost:1337/api/iphones`, {
// const res = await axios.get(`http://193.203.161.234:1337/api/iphones`, {
const res = await axios.get(
`http://localhost:1337/api/deal-of-the-day-2s?populate=*`,
`http://193.203.161.234:1337/api/deal-of-the-day-2s?populate=*`,
{
headers: {
Authorization:
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/About/About.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function About() {
const fetchData = async () => {
try {
const res = await axios.get(
`http://localhost:1337/api/abouts/1?populate=*`,
`http://193.203.161.234:1337/api/abouts/1?populate=*`,
{
headers: {
Authorization:
Expand Down
4 changes: 2 additions & 2 deletions client/src/pages/Covers/Covers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function CoverSection() {
const fetchData = async () => {
try {
const res = await axios.get(
`http://localhost:1337/api/covers/${id}?populate=*`,
`http://193.203.161.234:1337/api/covers/${id}?populate=*`,
{
headers: {
Authorization:
Expand Down Expand Up @@ -185,7 +185,7 @@ function CoverSection() {
const fetchData = async () => {
try {
const res = await axios.get(
`http://localhost:1337/api/covers/${id}?populate=*`,
`http://193.203.161.234:1337/api/covers/${id}?populate=*`,
{
headers: {
Authorization:
Expand Down
5 changes: 2 additions & 3 deletions client/src/pages/JustIn/JustIn.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ function JustIn() {
useEffect(() => {
const fetchData = async () => {
try {
// const res = await axios.get(`http://localhost:1337/api/iphones`, {
// const res = await axios.get(`http://193.203.161.234:1337/api/iphones`, {
const res = await axios.get(
`http://localhost:1337/api/just-ins?populate=*`,
`http://193.203.161.234:1337/api/just-ins?populate=*`,
{
headers: {
Authorization:
Expand Down Expand Up @@ -88,7 +88,6 @@ function JustIn() {
Be the first one to get your hands on these new products.
</motion.h2>
</div>

</div>

<div className="flex w-full my-10 border border-gray-800 rounded-xl">
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/PrivacyPolicy/Privacy.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function Privacy() {
const fetchData = async () => {
try {
const res = await axios.get(
`http://localhost:1337/api/policies/2?populate=*`,
`http://193.203.161.234:1337/api/policies/2?populate=*`,
{
headers: {
Authorization:
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/PrivacyPolicy/RefundReturn.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function RefundReturn() {
const fetchData = async () => {
try {
const res = await axios.get(
`http://localhost:1337/api/policies/1?populate=*`,
`http://193.203.161.234:1337/api/policies/1?populate=*`,
{
headers: {
Authorization:
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/PrivacyPolicy/ShippingPolicy.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function ShippingPolicy() {
const fetchData = async () => {
try {
const res = await axios.get(
`http://localhost:1337/api/policies/1?populate=*`,
`http://193.203.161.234:1337/api/policies/1?populate=*`,
{
headers: {
Authorization:
Expand Down
7 changes: 3 additions & 4 deletions client/src/pages/ProductPage/ProductPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function ProductSection() {
const fetchData = async () => {
try {
const res = await axios.get(
`http://localhost:1337/api/deal-of-the-day-2s/${id}?populate=*`,
`http://193.203.161.234:1337/api/deal-of-the-day-2s/${id}?populate=*`,
{
headers: {
Authorization:
Expand Down Expand Up @@ -163,7 +163,7 @@ function ProductSection() {
const fetchData = async () => {
try {
const axiosInstance = axios.create({
baseURL: `http://localhost:1337/api/deal-of-the-day-2s`,
baseURL: `http://193.203.161.234:1337/api/deal-of-the-day-2s`,
headers: {
Authorization:
"bearer " +
Expand Down Expand Up @@ -271,7 +271,7 @@ function ProductSection() {
const fetchData = async () => {
try {
const res = await axios.get(
`http://localhost:1337/api/deal-of-the-day-2s/${id}?populate=*`,
`http://193.203.161.234:1337/api/deal-of-the-day-2s/${id}?populate=*`,
{
headers: {
Authorization:
Expand Down Expand Up @@ -658,7 +658,6 @@ function ProductSection() {
containerProps={{
className: "min-w-0",
}}

/>
<Button
size="sm"
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/Specs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function Specs({ isOpen, onClose }) {
const fetchData = async () => {
try {
const res = await axios.get(
`http://localhost:1337/api/deal-of-the-day-2s/${id}?populate=*`,
`http://193.203.161.234:1337/api/deal-of-the-day-2s/${id}?populate=*`,
{
headers: {
Authorization:
Expand Down

0 comments on commit 44c8cff

Please sign in to comment.