Skip to content

Commit 82f0b21

Browse files
committed
fixed header card padding when progress is hidden; added route preloading
1 parent d3c1805 commit 82f0b21

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/components/habit/card.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export const HabitCard: React.FC = () => {
4040
color.text,
4141
color.lightBackground,
4242
{ "pt-1": !displayOptions.hideProgressbar },
43+
{ "py-1": displayOptions.hideProgressbar },
4344
{ "opacity-50": isCompleted },
4445
)}
4546
>

src/routes.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const history = createHashHistory()
1313
const common = {
1414
getParentRoute: () => rRoot,
1515
pendingComponent: LoadingPage,
16+
preload: true,
1617
}
1718

1819
export const rRoot = createRootRoute({
@@ -24,6 +25,7 @@ export const rSettings = createRoute({
2425
...common,
2526
path: "/settings",
2627
component: React.lazy(() => import("@/components/settings-page")),
28+
preload: true,
2729
})
2830

2931
export const rHabitList = createRoute({
@@ -61,6 +63,7 @@ const routeTree = rRoot.addChildren([rHabitList, rSettings, rNewHabit, rHabit, r
6163
export const router = createRouter({
6264
history,
6365
routeTree,
66+
defaultPreload: "render",
6467
})
6568

6669
declare module "@tanstack/react-router" {

0 commit comments

Comments
 (0)