Skip to content

Commit

Permalink
🗑️ Deleted profiles page (#1585)
Browse files Browse the repository at this point in the history
* removed the link to profile page in dropdown

* removed unused props

* delete profiles pages

* cleaned up apiService.js

* remove unused var

* delete more stuff
  • Loading branch information
babakamyljanovssw authored Oct 24, 2024
1 parent 826d824 commit 8f43c4d
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 1,451 deletions.
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
100 changes: 0 additions & 100 deletions src/components/comments-not-connected/comments-not-connected.js

This file was deleted.

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

0 comments on commit 8f43c4d

Please sign in to comment.