Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
.env.development.local
.env.test.local
.env.production.local
.env

npm-debug.log*
yarn-debug.log*
Expand Down
5 changes: 4 additions & 1 deletion src/context/PhotoContext.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import React, { createContext, useState } from "react";
import axios from "axios";
import { apiKey } from "../api/config";

const updatedApiKey = process?.env.REACT_APP_API_KEY;

export const PhotoContext = createContext();

const PhotoContextProvider = props => {
Expand All @@ -9,7 +12,7 @@ const PhotoContextProvider = props => {
const runSearch = query => {
axios
.get(
`https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=${apiKey}&tags=${query}&per_page=24&format=json&nojsoncallback=1`
`https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=${updatedApiKey}&tags=${query}&per_page=24&format=json&nojsoncallback=1`
)
.then(response => {
setImages(response.data.photos.photo);
Expand Down
10 changes: 10 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,14 @@ input {
-o-transform: rotate(45deg);
box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.8);
}
}
.search-form button{
border: 3px solid #d7dbdf;
background-color: #ccc;
}
.main-nav ul li a{
transition: transform 0.5s ease-out;
}
.main-nav ul li a:hover{
transform: scale(1.15);
}