Skip to content

Commit

Permalink
Removed Redux
Browse files Browse the repository at this point in the history
  • Loading branch information
jwngr committed Jul 6, 2024
1 parent a1be978 commit 406c99b
Show file tree
Hide file tree
Showing 16 changed files with 94 additions and 242 deletions.
76 changes: 4 additions & 72 deletions website/package-lock.json

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

3 changes: 0 additions & 3 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
"react-dom": "^16.2.0",
"react-helmet": "^6.0.0",
"react-media": "^1.8.0",
"react-redux": "^7.1.1",
"react-router-dom": "^5.1.2",
"react-tweet-embed": "^1.1.0",
"redux": "^4.0.0",
"styled-components": "^5.0.1",
"topojson-client": "^3.0.0",
"typeface-bungee": "1.1.13",
Expand All @@ -46,7 +44,6 @@
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"prettier": "^3.3.2",
"redux-logger": "^3.0.6",
"require-context.macro": "^1.2.2",
"source-map-explorer": "^2.5.3",
"typescript": "^5.5.3",
Expand Down
2 changes: 0 additions & 2 deletions website/src/actions.js

This file was deleted.

4 changes: 2 additions & 2 deletions website/src/components/charts/LineChart/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,13 @@ export class LineChart extends Component {
}

return (
<React.Fragment>
<>
{tooltipContent}
<LineChartWrapper className="line-chart-wrapper">
<LineChartSvg ref={(r) => (this.lineChartRef = r)} />
{this.props.children}
</LineChartWrapper>
</React.Fragment>
</>
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions website/src/components/charts/PerSeasonBarChart/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,12 @@ export class PerSeasonBarChart extends Component {
}

return (
<React.Fragment>
<>
{tooltipContent}
<PerSeasonBarChartWrapper className="bar-chart-wrapper">
<PerSeasonBarChartSvg ref={(r) => (this.perSeasonBarChartRef = r)} />
</PerSeasonBarChartWrapper>
</React.Fragment>
</>
);
}
}
Expand Down
10 changes: 5 additions & 5 deletions website/src/components/explorables/Explorables/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import {Helmet} from 'react-helmet';
import {Link} from 'react-router-dom';

import {InternalLink} from '../../common/InternalLink2';
import {NewsletterSignupForm} from '../../common/NewsletterSignupForm';
import {
BlogPostCardWrapper,
Expand Down Expand Up @@ -34,16 +34,16 @@ const posts = [

const BlogPostCard = ({slug, date, title, subtitle, description}) => (
<BlogPostCardWrapper>
<InternalLink to={`/explorables/${slug}`}>
<Link to={`/explorables/${slug}`}>
{title}: {subtitle}
</InternalLink>
</Link>
<BlogPostDate>{date}</BlogPostDate>
<BlogPostDescription>{description}</BlogPostDescription>
</BlogPostCardWrapper>
);

export const Explorables = () => (
<React.Fragment>
<>
<Helmet>
<title>Explorables | notreda.me</title>
</Helmet>
Expand All @@ -62,5 +62,5 @@ export const Explorables = () => (

<NewsletterSignupForm />
</Wrapper>
</React.Fragment>
</>
);
4 changes: 2 additions & 2 deletions website/src/components/explorables/index.styles.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {darken} from 'polished';
import React from 'react';
import {Link} from 'react-router-dom';
import styled from 'styled-components';

import backgroundImage from '../../images/background.png';
import {InternalLink} from '../common/InternalLink2';

export const Wrapper = styled.div`
max-width: 740px;
Expand Down Expand Up @@ -163,7 +163,7 @@ export const StyledExternalLink = styled.a`
}
`;

export const StyledInternalLink = styled(InternalLink)`
export const StyledInternalLink = styled(Link)`
color: ${(props) => props.theme.colors.green};
&:hover {
Expand Down
17 changes: 15 additions & 2 deletions website/src/components/gameSummary/GameSummary.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
import clone from 'lodash/clone';
import PropTypes from 'prop-types';
import React from 'react';

import schedule from '../../resources/schedule';
import teams from '../../resources/teams';
import {CompletedGameSummary} from './CompletedGameSummary';
import {FutureGameSummary} from './FutureGameSummary';

export const GameSummary = ({game}) => {
export const GameSummary = ({selectedYear, selectedGameIndex}) => {
const games = schedule[selectedYear];
const game = clone(games[selectedGameIndex]);

game.season = Number(selectedYear);

game.weekIndex = Number(selectedGameIndex);

game.opponent = teams[game.opponentId];
game.opponent.abbreviation = game.opponentId;

const notreDame = teams.ND;
notreDame.abbreviation = 'ND';

Expand All @@ -18,5 +30,6 @@ export const GameSummary = ({game}) => {
};

GameSummary.propTypes = {
game: PropTypes.object.isRequired,
selectedYear: PropTypes.number.isRequired,
selectedGameIndex: PropTypes.number.isRequired,
};
12 changes: 0 additions & 12 deletions website/src/configureStore.js

This file was deleted.

11 changes: 0 additions & 11 deletions website/src/containers/GameContainer.js

This file was deleted.

24 changes: 0 additions & 24 deletions website/src/containers/GameSummaryContainer.js

This file was deleted.

15 changes: 0 additions & 15 deletions website/src/containers/NavMenuContainer.js

This file was deleted.

Loading

0 comments on commit 406c99b

Please sign in to comment.