From f861e6a269ba9f62700776d3cd13b644a9e836d4 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 20 Sep 2023 16:38:54 +0200 Subject: refactor: use named export for everything except pages Next expect a default export for pages so only those components should use default exports. Everything else should use named exports to reduce the number of import statements. --- src/utils/hooks/use-settings.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/utils/hooks/use-settings.tsx') diff --git a/src/utils/hooks/use-settings.tsx b/src/utils/hooks/use-settings.tsx index edb5b5e..968930d 100644 --- a/src/utils/hooks/use-settings.tsx +++ b/src/utils/hooks/use-settings.tsx @@ -67,11 +67,11 @@ export type UseSettingsReturn = { * * @returns {UseSettingsReturn} - An object describing settings. */ -const useSettings = (): UseSettingsReturn => { +export const useSettings = (): UseSettingsReturn => { const { baseline, copyright, email, locales, name, postsPerPage, url } = settings; const router = useRouter(); - const locale = router.locale || locales.defaultLocale; + const locale = router.locale ?? locales.defaultLocale; return { blog: { @@ -93,5 +93,3 @@ const useSettings = (): UseSettingsReturn => { }, }; }; - -export default useSettings; -- cgit v1.2.3 Armand Philippot
aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/nav/nav-link/nav-link.tsx
blob: c2b0f5f8fad4b59d7bc8a3dfac1fd1aeeb6bf6c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66