Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🗑️ Deleted profiles page #1585

Merged
merged 9 commits into from
Oct 24, 2024
8 changes: 0 additions & 8 deletions gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const siteConfig = require('./site-config');
const { createFilePath } = require('gatsby-source-filesystem');
const appInsights = require('applicationinsights');
const WebpackAssetsManifest = require('webpack-assets-manifest');
Expand Down Expand Up @@ -239,13 +238,6 @@ exports.createPages = async ({ graphql, actions }) => {
});
});
});

const profilePage = require.resolve('./src/pages/profile.js');
createPage({
path: `${siteConfig.pathPrefix}/people/`,
matchPath: `${siteConfig.pathPrefix}/people/:gitHubUsername`,
component: profilePage,
});
};

exports.sourceNodes = async ({ actions, createNodeId }) => {
Expand Down
1 change: 0 additions & 1 deletion site-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const titles = {
'/user/': `User Rules`,
'/orphaned/': `Orphaned Rules`,
'/archived/': `Archived Rules`,
'/profile/': `Profile`,
};

module.exports = {
Expand Down
12 changes: 1 addition & 11 deletions src/components/dropdown-card/dropdown-card.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React from 'react';
import { navigate } from 'gatsby';
import PropTypes from 'prop-types';
import { useAuth0 } from '@auth0/auth0-react';
import GitHubIcon from '-!svg-react-loader!../../images/github.svg';

const DropdownCard = ({ setOpen }) => {
const DropdownCard = () => {
const { logout, user } = useAuth0();
return (
<>
Expand All @@ -20,15 +19,6 @@ const DropdownCard = ({ setOpen }) => {
</a>
</div>
<hr />
<button
className="dropdown-user-btn-container"
onClick={() => {
setOpen(false);
navigate('/profile');
}}
>
Your Profile
</button>
<button
className="dropdown-signout-btn-container"
onClick={() => {
Expand Down
11 changes: 2 additions & 9 deletions src/components/dropdown-icon/dropdown-icon.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React, { useState, useEffect, useRef } from 'react';
import PropTypes from 'prop-types';
import DropdownBadge from '../dropdown-badge/dropdown-badge';
import DropdownCard from '../dropdown-card/dropdown-card';

const DropdownIcon = ({ displayActions }) => {
const DropdownIcon = () => {
const [open, setOpen] = useState(false);

const drop = useRef(null);
Expand All @@ -21,15 +20,9 @@ const DropdownIcon = ({ displayActions }) => {
return (
<div className="dropdown" ref={drop}>
<DropdownBadge onClick={() => setOpen((open) => !open)} />
{open && (
<DropdownCard setOpen={setOpen} displayActions={displayActions} />
)}
{open && <DropdownCard />}
</div>
);
};

DropdownIcon.propTypes = {
displayActions: PropTypes.bool,
};

export default DropdownIcon;
Loading
Loading