Skip to content

Commit

Permalink
UX update
Browse files Browse the repository at this point in the history
  • Loading branch information
chunlaw committed Dec 16, 2024
1 parent 0b5a28f commit f536fd1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 14 deletions.
41 changes: 27 additions & 14 deletions src/components/route-board/SwipeableRoutesBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,26 +130,39 @@ const SwipeableRoutesBoard = ({
</AutoSizer>
) : (
<Box sx={noResultSx}>
<Box display="flex" alignItems="center">
<SentimentVeryDissatisfiedIcon fontSize="small" />
<Box
display="flex"
alignItems="center"
flexDirection="column"
gap={1}
>
{availableBoardTab[index] !== "recent" ? (
<>
<Typography variant="h6">
&quot;{searchRoute}&quot;
</Typography>
<Typography variant="h6">
{t("route-search-no-result")}
</Typography>
</>
) : (
<>
{searchRoute.length > 0 && (
<Box display="flex" alignItems="center">
<SentimentVeryDissatisfiedIcon fontSize="small" />
<Typography variant="h6">
&quot;{searchRoute}&quot;
</Typography>
)}
<Typography variant="h6">{t("no-recent-search")}</Typography>
<Typography variant="h6">
{t("route-search-no-result")}
</Typography>
</Box>
<Typography variant="body1">
{t("suggest-update-database")}
</Typography>
</>
) : (
<Box display="flex" alignItems="center" gap={2}>
<Box display="flex" alignItems="center">
<SentimentVeryDissatisfiedIcon fontSize="small" />
{searchRoute.length > 0 && (
<Typography variant="h6">
&quot;{searchRoute}&quot;
</Typography>
)}
</Box>
<Typography variant="h6">{t("no-recent-search")}</Typography>
</Box>
)}
</Box>
{availableBoardTab[index] !== "all" && (
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ const resources = {
mtr: "MTR",
ferry: "Ferry",
"route-search-no-result": "No Result",
"suggest-update-database": "You may Go Settings and Update Route Database",
"no-recent-search": "No Record",
"tap-here-to-search-all-routes":
"<TapHereLink>Tap here</TapHereLink> to search all routes",
Expand Down Expand Up @@ -228,6 +229,7 @@ const resources = {
"KMB first": "九巴優先",
"CTB first": "城巴優先",
"route-search-no-result": "沒有結果",
"suggest-update-database": "可嘗試到設定,更新路線資料庫",
"no-recent-search": "沒有記錄",
"tap-here-to-search-all-routes":
"<TapHereLink>按此</TapHereLink>以搜尋「全部」路綫",
Expand Down

0 comments on commit f536fd1

Please sign in to comment.