Skip to content

Commit

Permalink
memo app order
Browse files Browse the repository at this point in the history
  • Loading branch information
eike-hass committed Jun 7, 2024
1 parent daed684 commit b561a25
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions web/src/pages/AppPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React, { useMemo, useState } from 'react';
import { Link } from 'react-router-dom';
import { Button, Modal } from 'antd';
import { Layout, RandomGraphicElement } from '../components';
Expand Down Expand Up @@ -65,6 +65,10 @@ const AppPicker: React.FC = () => {

const [open, setOpen] = useState("");

const randomOrderWallets = useMemo(() => {
return wallets.sort( () => .5 - Math.random() )
}, [])

return (
<Layout noHeader noFooter>
<React.Fragment>
Expand All @@ -75,7 +79,7 @@ const AppPicker: React.FC = () => {

<h1 className='title'>{t("actions.downloadApp")}</h1>
<div className='apps'>
{wallets.sort( () => .5 - Math.random() ).map(wallet => (
{randomOrderWallets.map(wallet => (
<div className="app">
<section className="app__wrapper">
<div className='app__column'>
Expand Down

0 comments on commit b561a25

Please sign in to comment.