Skip to content

Commit

Permalink
Merge pull request #4259 from CrocSwap/regenerate-lockfile-oct-24-merge2
Browse files Browse the repository at this point in the history
regenerate yarn.lock & fix chain switching when wallet not connected
  • Loading branch information
benwolski authored Oct 30, 2024
2 parents bfec13a + dedd1ad commit 91e8836
Show file tree
Hide file tree
Showing 8 changed files with 2,080 additions and 3,474 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"react-jazzicon": "^1.0.4",
"react-lottie-player": "^2.1.0",
"react-reveal": "^1.2.2",
"react-router-dom": "^6.3.0",
"react-router-dom": "^6.27.0",
"react-transition-group": "^4.4.2",
"react-use-websocket": "^4.8.1",
"simplex-noise": "^4.0.3",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Chat/ChatPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function ChatPanel(props: propsIF) {
const [mentionIndex, setMentionIndex] = useState(-1);
// eslint-disable-next-line
const [notConnectedUserInterval, setNotConnectedUserInterval] =
useState<NodeJS.Timer>();
useState<NodeJS.Timeout>();

// that block toggled when message count limit is handled --------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions src/components/Futa/Comments/useCommentsWS.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ const useCommentsWS = (
const { isUserIdle } = useContext(AppStateContext);

const offlineFetcherMS = 3000;
const [offlineFetcher, setOfflineFetcher] = useState<NodeJS.Timer>();
const offlineFetcherRef = useRef<NodeJS.Timer>();
const [offlineFetcher, setOfflineFetcher] = useState<NodeJS.Timeout>();
const offlineFetcherRef = useRef<NodeJS.Timeout>();
offlineFetcherRef.current = offlineFetcher;

const url = CHAT_BACKEND_URL + '/chat/api/subscribe/';
Expand Down
42 changes: 20 additions & 22 deletions src/components/Global/TabComponent/TabComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ export default function TabComponent(props: TabPropsIF) {
<div className={styles.tab_icon_container}>
<DefaultTooltip
title={label}
placeholder={'bottom'}
arrow
enterDelay={400}
leaveDelay={200}
Expand Down Expand Up @@ -245,14 +244,14 @@ export default function TabComponent(props: TabPropsIF) {
: null}

{/* {desktopView && ( */}
<button
className={styles.label_button}
role='tab'
aria-selected={item.label === selectedTab.label}
tabIndex={0}
>
{item.label}
</button>
<button
className={styles.label_button}
role='tab'
aria-selected={item.label === selectedTab.label}
tabIndex={0}
>
{item.label}
</button>
{/* )} */}
{item.label === selectedTab.label && (
<div className={styles.underline} />
Expand Down Expand Up @@ -302,18 +301,18 @@ export default function TabComponent(props: TabPropsIF) {
? handleMobileMenuIcon(item.icon, item.label)
: null}
{/* {desktopView && ( */}
<button
className={`${styles.item_label} ${
item.label === selectedTab.label
? styles.selected
: ''
}`}
role='tab'
aria-selected={item.label === selectedTab.label}
>
{' '}
{item.label}
</button>
<button
className={`${styles.item_label} ${
item.label === selectedTab.label
? styles.selected
: ''
}`}
role='tab'
aria-selected={item.label === selectedTab.label}
>
{' '}
{item.label}
</button>
{/* // )} */}

{item.label === selectedTab.label && (
Expand All @@ -336,7 +335,6 @@ export default function TabComponent(props: TabPropsIF) {

return (
<div

className={styles.tab_window}
style={{ background: backgroundStyle }}
role='tablist'
Expand Down
4 changes: 2 additions & 2 deletions src/contexts/CandleContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ export const CandleContextProvider = (props: { children: React.ReactNode }) => {
isResetRequest: false,
});

const [offlineFetcher, setOfflineFetcher] = useState<NodeJS.Timer>();
const offlineFetcherRef = useRef<NodeJS.Timer>();
const [offlineFetcher, setOfflineFetcher] = useState<NodeJS.Timeout>();
const offlineFetcherRef = useRef<NodeJS.Timeout>();
offlineFetcherRef.current = offlineFetcher;

useEffect(() => {
Expand Down
40 changes: 21 additions & 19 deletions src/routes/PlatformAmbient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,36 +32,38 @@ const PlatformAmbientRoutes: React.FC = () => {
<Route path='trade' element={<Trade />}>
<Route
path=''
element={<Navigate to='/trade/market' replace />}
/>
<Route
path='market'
element={<Navigate to={defaultUrlParams.market} replace />}
element={<Navigate replace to={defaultUrlParams.market} />}
/>
<Route
path='market/:params'
element={<TradeSwap isOnTradeRoute={true} />}
/>
<Route
path='limit'
element={<Navigate to={defaultUrlParams.limit} replace />}
/>

<Route path='limit/:params' element={<Limit />} />
<Route
path='pool'
element={<Navigate to={defaultUrlParams.pool} replace />}
/>

<Route path='pool/:params' element={<Range />} />
<Route
path='reposition'
element={<Navigate to={defaultUrlParams.pool} replace />}
/>
<Route path='reposition/:params' element={<Reposition />} />
<Route
path='edit/'
element={<Navigate to='/trade/market' replace />}
element={<Navigate to={defaultUrlParams.pool} replace />}
/>
</Route>
<Route
path='trade/market'
element={<Navigate to={defaultUrlParams.market} replace />}
/>
<Route
path='trade/limit'
element={<Navigate to={defaultUrlParams.limit} replace />}
/>
<Route
path='trade/pool'
element={<Navigate to={defaultUrlParams.pool} replace />}
/>
<Route
path='trade/reposition'
element={<Navigate to={defaultUrlParams.pool} replace />}
/>
<Route
path='chat'
element={<ChatPanel isFullScreen={true} appPage={true} />}
Expand Down Expand Up @@ -170,7 +172,7 @@ const PlatformAmbientRoutes: React.FC = () => {
/>
<Route
path='swap'
element={<Navigate replace to={defaultUrlParams.swap} />}
element={<Navigate to={defaultUrlParams.swap} replace />}
/>
{/* refactor EXPLORE as a nested route */}
<Route
Expand Down
4 changes: 2 additions & 2 deletions src/utils/hooks/useOnBoundryChange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const useOnBoundryChange = (
checkFrequency: number,
handler: (newBoundries: ElementBoundry) => void,
) => {
const [boundryChecker, setBoundryChecker] = useState<NodeJS.Timer>();
const checkerRef = useRef<NodeJS.Timer>();
const [boundryChecker, setBoundryChecker] = useState<NodeJS.Timeout>();
const checkerRef = useRef<NodeJS.Timeout>();
checkerRef.current = boundryChecker;

const [elementWidth, setElementWidth] = useState<number>();
Expand Down
Loading

0 comments on commit 91e8836

Please sign in to comment.