Skip to content

Commit

Permalink
Merge pull request #1636 from newrelic/liz/remove-test-cookie
Browse files Browse the repository at this point in the history
Remove test cookie
  • Loading branch information
LizBaker authored Sep 15, 2021
2 parents 728eac3 + c98f247 commit c655638
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions src/pages/futurehack-2021.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, { useEffect } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { css } from '@emotion/react';
import cx from 'classnames';
import Cookies from 'js-cookie';
import PageLayout from '../components/PageLayout';
import { Button, Icon } from '@newrelic/gatsby-theme-newrelic';
import DevSiteSeo from '../components/DevSiteSeo';
Expand Down Expand Up @@ -31,21 +30,6 @@ const FutureHackPage = ({ location }) => {
margin-right: -${layout.contentPadding};
`;

const writeCookie = () => {
const currentEnvironment =
process.env.ENV || process.env.NODE_ENV || 'development';
const options = { expires: 1 /* days */ };
if (currentEnvironment !== 'development') {
options.domain = 'newrelic.com';
}

Cookies.set('newrelic-pack-id', 'test', options);
};

useEffect(() => {
writeCookie();
});

return (
<>
<DevSiteSeo location={location} />
Expand Down

0 comments on commit c655638

Please sign in to comment.