-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(frontend): improve components directory mapping and file names
- Loading branch information
1 parent
e478952
commit e215cee
Showing
211 changed files
with
251 additions
and
574 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
apps/frontend/src/app/gallery/components/GallerySlide/CompareSlider/DragHandle/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { DragHandle } from './DragHandle' |
1 change: 1 addition & 0 deletions
1
apps/frontend/src/app/gallery/components/GallerySlide/CompareSlider/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { CompareSlider } from './CompareSlider' |
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.../gallery/components/GallerySlideAside.tsx → ...e/GallerySlideAside/GallerySlideAside.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
apps/frontend/src/app/gallery/components/GallerySlide/GallerySlideAside/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { GallerySlideAside } from './GallerySlideAside' |
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
apps/frontend/src/app/gallery/components/GallerySlide/GallerySlideInfo/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { GallerySlideInfo } from './GallerySlideInfo' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
apps/frontend/src/app/gallery/components/GallerySlide/GallerySlidePopover/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { GallerySlidePopover } from './GallerySlidePopover' |
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
apps/frontend/src/app/gallery/components/GallerySlide/GallerySlideSkeleton/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './GallerySlideSkeleton' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './GallerySlide' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import type { FC, PropsWithChildren } from 'react' | ||
import type { PropsWithChildren } from 'react' | ||
import type { Metadata } from 'next' | ||
|
||
export const metadata: Metadata = { | ||
title: 'Gallery' | ||
} | ||
|
||
const GalleryLayout: FC<PropsWithChildren> = ({ children }) => children | ||
const GalleryLayout = ({ children }: PropsWithChildren) => children | ||
|
||
export default GalleryLayout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
apps/frontend/src/components/ImageUploader/ImageUploaderLoading/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { ImageUploaderLoading } from './ImageUploaderLoading' |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './LayoutDrawer' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
1 change: 1 addition & 0 deletions
1
apps/frontend/src/components/navigation/NavigationDesktop/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { NavigationDesktop } from './NavigationDesktop' |
3 changes: 3 additions & 0 deletions
3
apps/frontend/src/components/navigation/NavigationMobile/NavigationMobile.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.root { | ||
row-gap: 2px; | ||
} |
30 changes: 30 additions & 0 deletions
30
apps/frontend/src/components/navigation/NavigationMobile/NavigationMobile.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
'use client' | ||
|
||
import { Flex } from '@radix-ui/themes' | ||
|
||
import { NavigationMobileItem } from './NavigationMobileItem' | ||
import { PATH_ROOT } from '@site/paths' | ||
import { navigationItems } from '../data' | ||
import type { NavigationItemModel } from '../types' | ||
import styles from './NavigationMobile.module.css' | ||
|
||
const items: NavigationItemModel[] = [ | ||
{ | ||
label: 'Homepage', | ||
href: PATH_ROOT | ||
}, | ||
...navigationItems.map(item => ({ | ||
...item, | ||
icon: undefined | ||
})) | ||
] | ||
|
||
export const NavigationMobile = () => ( | ||
<Flex asChild direction='column' width='100%' className={styles.root}> | ||
<nav> | ||
{items.map(item => ( | ||
<NavigationMobileItem key={item.label} {...item} /> | ||
))} | ||
</nav> | ||
</Flex> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
.../src/components/navigation/NavigationMobile/NavigationMobileItem/NavigationMobileItem.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import Link from 'next/link' | ||
import { Text, Link as RadixLink } from '@radix-ui/themes' | ||
import { clsx } from 'clsx' | ||
|
||
import { useSelectedPath } from '@hooks/useSelectedPath' | ||
import type { NavigationItemModel } from '@components/navigation/types' | ||
import styles from './NavigationMobileItem.module.css' | ||
|
||
export const NavigationMobileItem = ({ | ||
href, | ||
label, | ||
icon, | ||
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars | ||
tooltipContent: _, | ||
...attributes | ||
}: NavigationItemModel) => { | ||
const isSelected = useSelectedPath(href) | ||
|
||
return ( | ||
<RadixLink | ||
asChild | ||
size='3' | ||
className={clsx(styles.root, { | ||
[styles.selected]: isSelected | ||
})} | ||
> | ||
<Link {...attributes} href={href}> | ||
{icon} <Text ml={icon ? '2' : '0'}>{label}</Text> | ||
</Link> | ||
</RadixLink> | ||
) | ||
} |
1 change: 1 addition & 0 deletions
1
apps/frontend/src/components/navigation/NavigationMobile/NavigationMobileItem/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { NavigationMobileItem } from './NavigationMobileItem' |
2 changes: 2 additions & 0 deletions
2
apps/frontend/src/components/navigation/NavigationMobile/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { NavigationMobile } from './NavigationMobile' | ||
export { NavigationMobileItem } from './NavigationMobileItem' |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { Checkbox, type Props, rootTestId } from './Checkbox' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rontend/src/design-system/select/index.ts → ...rontend/src/design-system/Select/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export { Select } from './select' | ||
export { Select } from './Select' | ||
export type { SelectData } from './types' |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.