Skip to content

Commit

Permalink
Use environment variables for Algolia
Browse files Browse the repository at this point in the history
  • Loading branch information
w3bdesign committed Dec 17, 2020
1 parent a22b794 commit f1a16bd
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 52 deletions.
8 changes: 5 additions & 3 deletions components/AlgoliaSearch/AlgoliaSearchBox.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ import algoliasearch from 'algoliasearch';
import { InstantSearch, SearchBox, Hits } from 'react-instantsearch-dom';
import { useState } from 'react';

import WOO_CONFIG from 'utils/config/nextConfig';
import WOO_CONFIG from 'utils/config/nextConfig';
import SearchResults from './SearchResults.component';

const searchClient = algoliasearch(
WOO_CONFIG.ALGOLIA_APP_ID,
WOO_CONFIG.ALGOLIA_PUBLIC_API_KEY
// WOO_CONFIG.ALGOLIA_APP_ID,
// WOO_CONFIG.ALGOLIA_PUBLIC_API_KEY
process.env.ALGOLIA_APP_ID,
process.env.ALGOLIA_PUBLIC_API_KEY
);

// https://www.algolia.com/doc/api-reference/widgets/instantsearch/react/
Expand Down
2 changes: 1 addition & 1 deletion components/Cart/Cart.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const Cart = () => {
<svg
className="fill-current"
xmlns="http://www.w3.org/2000/svg"
width="50"
width="155"
height="55"
viewBox="0 0 30 30"
aria-label="Handlekurv"
Expand Down
35 changes: 5 additions & 30 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nextjs-woocommerce",
"version": "1.0.6",
"version": "1.0.7",
"description": "Nextjs WooCommerce webshop",
"main": "index.js",
"scripts": {
Expand All @@ -23,7 +23,7 @@
"postcss": "^8.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-hook-form": "^6.13.0",
"react-hook-form": "^6.13.1",
"react-instantsearch-dom": "^6.8.2",
"react-spring": "^8.0.27",
"styled-components": "^5.2.1",
Expand Down
4 changes: 0 additions & 4 deletions postcss.config.js.example

This file was deleted.

12 changes: 0 additions & 12 deletions tailwind.config.js.example

This file was deleted.

0 comments on commit f1a16bd

Please sign in to comment.