Skip to content

Commit

Permalink
fix(frontend): 🐛 fix id being shown instead of name in dropdown (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
Magnus Alexander Strømseng authored and GitHub committed Apr 28, 2024
1 parent ea224c3 commit a72c994
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 87 deletions.
2 changes: 2 additions & 0 deletions docs/developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ To install all requirements simply do the following from the project root:

`npm i && cd ./frontend && npm i && cd ../backend && npm i && cd ..` This will run npm install in all the folders necessary.

Goto `/backend` and copy the `.env.example` file and paste it as a `.env`.

Then do `npm run dev` from the root dir to run both the client and the server at the same time.

If this doesn't work you might have to enter and build the backend (strapi) first.
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/homeComponents/SatDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export default function SatDropdown({
transition={{ duration: 0.5 }}
>
{Object.entries(satNumToEntry).map(([num]) => {
let satNum = Number(num) as SatelliteNumber;
return (
<div
key={num}
Expand All @@ -140,10 +141,9 @@ export default function SatDropdown({
handleSelect(Number(num) as SatelliteNumber)
}
>
{(Number(num) as SatelliteNumber) !==
selectedSatellite
? num
: `${num} (Selected)`}
{satNum !== selectedSatellite
? satNumToEntry[satNum].name
: `${satNumToEntry[satNum].name} (Selected)`}
</div>
);
})}
Expand Down
83 changes: 0 additions & 83 deletions package-lock.json

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

0 comments on commit a72c994

Please sign in to comment.