Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ad7c8db

Browse files
Merge pull request #6 from bkrmadtya/chore/new-deployment
chore: new deployment
2 parents d5c1ef5 + 515aaf9 commit ad7c8db

File tree

29 files changed

+150
-105
lines changed

29 files changed

+150
-105
lines changed

‎public/index.html‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
<html>
33
<head>
44
<meta charset="utf-8" />
5-
<meta name="og:title" property="og:title" content="Sorting Algorithms Visualier">
5+
<meta name="og:title" property="og:title" content="Sorting Algorithm Visualizer">
6+
<meta name="site" content="Sorting Algorithm Visualizer" />
7+
<meta name="author" content="Bikram Karki" />
68
<title>Sorting Algorithms Visualier</title>
79
</head>
810
<body>
911
<div id="root"></div>
1012
</body>
11-
</html>
13+
</html>

‎src/App.tsx‎

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,28 @@
1-
import React,{useEffect} from 'react'
1+
import React from 'react'
22
import { BrowserRouter as Router, Switch, Route, Link } from 'react-router-dom'
33

4-
// style
54
import './styles/app.scss'
65

7-
// components
86
import { NavBar } from './components/shared'
97
import { Home, Algorithms, About } from './pages'
8+
import Modal from './components/shared/Modal'
109

1110
const App: React.FC = () => {
12-
useEffect(() => {
13-
alert(
14-
`Caution!\nThe application shows flashing colors.\n Please, use it in color mode 'off' if you are affected by it.`
15-
)
16-
}, [])
1711
return (
1812
<div className='app'>
1913
<Router>
2014
<NavBar>
2115
<Link to='/algorithms'>ALGORITHMS</Link>
2216
<Link to='/about'>ABOUT</Link>
2317
</NavBar>
18+
<Modal />
2419
<Switch>
25-
<Route path='/algorithms'>
26-
<Algorithms />
27-
</Route>
28-
<Route path='/about'>
29-
<About />
30-
</Route>
31-
<Route path='/'>
32-
<Home />
33-
</Route>
20+
<Route exact path='/algorithms' component={Algorithms} />
21+
<Route exact path='/about' component={About} />
22+
<Route exact path='/' component={Home} />
3423
</Switch>
3524
</Router>
36-
</div>
25+
</div>
3726
)
3827
}
3928

‎src/components/Algorithms/ContentContainer.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import React from 'react'
22

3-
// components
43
import Section from './Section'
54

6-
// utils
75
import { ITableOfContent } from '../../utils'
86

97
interface IProps {

‎src/components/Algorithms/Section.tsx‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import React from 'react'
22

3-
// components
4-
import { Header } from '../shared'
5-
6-
// utils
73
import { ITableOfContent } from '../../utils'
84

5+
import { Header } from '../shared'
96
interface IProps {
107
content: ITableOfContent
118
}

‎src/components/Algorithms/SideMenu.tsx‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import React from 'react'
22

3-
// components
4-
import { Header } from '../shared'
5-
6-
// utils
73
import { ITableOfContent } from '../../utils'
84

5+
import { Header } from '../shared'
6+
97
interface IProps {
108
tableOfContent: ITableOfContent[]
119
selected: string
12-
onClick: (name: string) => any
10+
onClick: (name: string) => void
1311
}
1412

1513
const AlgorithmsTabs: React.FC<IProps> = ({

‎src/components/Home/Bar.tsx‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import React,{useRef} from 'react'
1+
import React from 'react'
22

3-
// utils
43
import { BarStatus } from '../../utils'
54

65
interface IProps {
@@ -13,12 +12,7 @@ const Bar: React.FC<IProps> = ({ value, status }: IProps) => {
1312
height: value * 2,
1413
backgroundColor: `var(--${status})`
1514
}
16-
// const renderCount = useRef(0)
17-
return (
18-
<div className='bar' style={barStyle}>
19-
{/* {renderCount.current++} */}
20-
</div>
21-
)
15+
return (<div className='bar' style={barStyle} />)
2216
}
2317

2418
export default React.memo(Bar)

‎src/components/Home/BarContainer.tsx‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import React from 'react'
22

3-
// components
4-
import BarComponent from './Bar'
5-
6-
// utils
73
import { Bar } from '../../utils'
84

5+
import BarComponent from './Bar'
96
interface IProps {
107
step: Bar[]
118
}

‎src/components/Home/Legend.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from 'react'
22

3-
// utils
43
import { BarStatus } from 'src/utils'
54

65
const Legend: React.FC<{ type: BarStatus }> = ({ type }) => {

‎src/components/Home/LegendContainer.tsx‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
import React, { useMemo,useRef } from 'react'
1+
import React, { useMemo } from 'react'
22
import { useSelector } from 'react-redux'
33

4-
// components
5-
import Legend from './Legend'
6-
import { Header } from '../shared'
7-
8-
// utils
94
import { BarStatus } from '../../utils'
105
import { getColorMode } from '../../store/slice/sorting'
116

7+
import Legend from './Legend'
8+
import { Header } from '../shared'
129

1310
const getLegends = (colorMode: boolean) => {
1411
if (colorMode) {

‎src/components/Home/MainPanel.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import React from 'react'
22

3-
// hooks'
43
import useSort from '../../hooks/useSort'
54

6-
// components
75
import BarContainer from './BarContainer'
86
import Controls from './Controls'
97
import LegendContainer from './LegendContainer'

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /