Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

301 update files for nextjs with use client #302

Merged
merged 6 commits into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "TobiTRy"
},
"private": false,
"version": "0.5.4",
"version": "0.5.6",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down Expand Up @@ -49,6 +49,7 @@
"@types/react-router-dom": "5.3.3",
"@types/react-test-renderer": "^18.3.0",
"react-router-dom": "^6.23.0",
"rollup-preserve-directives": "^1.1.1",
"vite-plugin-dts": "^3.9.0"
},
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/ActionWrapper/ActionWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React from 'react';

// Define specific prop types for 'a' and 'button'
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/AlignedLabel/AlignedLabel.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { StyledAlignedLabel } from './AlignedLabel.style';
import { Typography } from '@/components/atoms/Typography';

Expand Down
1 change: 1 addition & 0 deletions src/components/atoms/AutoSizingBox/AutoSizingBox.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import { useEffect, useRef, useState } from 'react';
import { InnerContentWrapper } from './AutoSizingBox.style';
import { TAutoSizingBox } from './TAutoSizingBox.model';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/AvilableDot/AvailableDot.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { styled } from 'styled-components';

import { TTheme } from '@/types/TTheme';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/BackDrop/BackDrop.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { useEffect, useRef } from 'react';
import styled from 'styled-components';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { StyledCheckerBoardPattern } from './CheckerBoardPattern.style';
import { TCheckerBoardPattern } from './TCheckerBoardPattern.model';

Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/ColorIndicator/ColorIndicator.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import Color from 'color';

import { Indicator, WrapperIndicator } from './ColorIndicator.style';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/ColoredText/ColoredText.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { TDynamicElement } from '@/types/TDynamicElement';
import { StyledItem } from './ColoredText.style';
import { TColoredText } from './TColoredText.model';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/DateInput/DateInput.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { forwardRef, useState } from 'react';

import { TDateInputPropsWithNativeAttrs } from './TDateInput.model';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/DateNumberAtom/DateNumberAtom.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { Typography } from '@/components/atoms/Typography';
import { StyledDay } from './DateNumberAtom.style';
import { IDateNumberAtom } from './IDateNumberAtom.model';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/DateOutput/DateOutput.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { useEffect, useMemo, useState } from 'react';

import { Typography } from '@/components/atoms/Typography';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { useState } from 'react';

import { Typography } from '@/components/atoms/Typography';
Expand All @@ -23,7 +25,7 @@ export default function DescriptionPreview(props: TDescriptionPreview) {
layer={buttonText?.layer ?? 0}
fontWeight={'bold'}
>
{isShowMore ? buttonText?.showLess ?? 'Show less' : buttonText?.showMore ?? 'Show more'}
{isShowMore ? (buttonText?.showLess ?? 'Show less') : (buttonText?.showMore ?? 'Show more')}
</Typography>
</RawButton>
)}
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/DisableBox/DisabledBox.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { StyledDisabledBox } from './DisabledBox.style';
import { TDisabledBox } from './TDisabled.model';

Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/DropDownSelect/DropDownSelect.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { TDropDownSelect, TDropDownSelectNativeAttrs } from '@/components/atoms/DropDownSelect/TDropDownSelect.model';
import { SelectField } from './DropDownSelect.style';
import { forwardRef } from 'react';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { cloneElement } from 'react';
import { TDynamicComponentWrapper } from './TDynamicComponentWrapper.model';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { TDynamicElementWrapperWithHTMLAttrs } from './TDynamicElementWrapper.model';
import { StyledDynamicElementWrapper } from './DynamicElementWrapper.style';

Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/FancyAWrapper/FancyAWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { FancyAWrapperStyle } from './FancyAWrpper.style';
import { TFancyAWrapperWithHTMLAttrs } from './TFancyAWrapper.model';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import ComponentAsWrapper from '@/components/shared/ComponentAsWrapper/ComponentAsWrapper';
import { StyledAnchor, StyledButton } from './FancyActionWrapper.style';
import { TFancyActionWrapper } from '@/components/atoms/FancyActionWrapper/TFancyActionWrapper.model';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/FancyBox/FancyBox.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { ElementType } from 'react';
import { TFancyBoxWithHTMLAttrs } from './FancyBox.model';
import { StyledFancyBox } from './FancyBox.style';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/FancyImageWrapper/FancyImageWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { TFancyImageWrapperWithNativeAttrs } from '@/components/atoms/FancyImageWrapper/FancyImageWrapper.model';
import { isAspectRatioValid } from '@/utils/validations/isAspectRatioValid';
import { ImageWrapper } from './FancyImageWrapper.style';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/FancyLI/FancyLI.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { FancyLiItem } from '@/components/atoms/FancyLI/FancyLI.style';
import { TFancyLIWithHTMLAttrs } from './TFancyLI.model';

Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/FancyLine/FancyLine.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { TFancyLineWithHTMLAttributes } from './TFancyLine.model';
import { StyledFancyLine } from '@/components/atoms/FancyLine/FancyLine.style';

Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/FancyLoadingBar/FancyLoadingBar.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { LoadingBar, LoadingContainer } from '@/components/atoms/FancyLoadingBar/FancyLoadingBar.style';
import { TFancyLoadingBar } from '@/components/atoms/FancyLoadingBar/TFancyLoadingBar.model';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { TFancyLoadingSpinner } from '@/components/atoms/FancyLoadingSpinner/IFancyLoadingSpinner.model';
import { SpinnerContainer, StyledFancyLoadingSpinner, StyledInnerSpinner } from './FancyLoadingSpinner.model';

Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/FancyPill/FancyPill.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { TFancyPillWithHTMLAttrs } from './TFancyPill.model';
import { StyledFancyPill } from './FancyPill.styled';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { TextAvatar } from '@/components/molecules/TextAvatar';
import { TFancyProfilePictureWithHTMLAttrs } from './TFancyProfilePicture.model';
import { FancyImageWrapper } from '@/components/atoms/FancyImageWrapper';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/FancySVGAtom/FancySVGAtom.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { TFancySVGAtomWithNativeAttrs } from './TFancySVGAtom.model';
import { StyledSVG } from './FancySVGAtom.style';

Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/FancySpacingBox/FancySpacingBox.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { ElementType } from 'react';

import { TFancySpacingBoxWithHTMLAttrs } from './TFancySpacingBox.model';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/FancyTextOverlay/FancyTextOverlay.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { TFancyTextOverlay } from '@/components/atoms/FancyTextOverlay/FancyTextOverlay.model';
import { Gradient, TextWrapper, Wrapper } from './FancyTextOverlay.style';

Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/FancyVideo/FancyVideo.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { isAspectRatioValid } from '@/utils/validations/isAspectRatioValid';
import { FancyVideoSource } from '@/components/atoms/FancyVideoSource';
import { StyledVideo } from '@/components/atoms/FancyVideo/FancyVideo.style';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/FancyVideoSource/FancyVideoSource.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React from 'react';

type IFancyVideoSourceProps = {
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/FancyXButton/FancyXButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { FancySVGAtom } from '@/components/atoms/FancySVGAtom';
import { TFancyXButtonWithHTMLAttrs } from '@/components/atoms/FancyXButton/FancyXButton.model';
import { StyledFancyXButton } from '@/components/atoms/FancyXButton/FancyXButton.style';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/Header/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { THeaderWithHTMLAttributes } from '@/components/atoms/Header/THeader.model';
import { StyledHeader } from './Header.style';
import { FancyNavBar } from '@/components/molecules/FancyNavBar';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/InputLabel/InputLabel.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { TInputLabelWithNAtiveAttrs } from './TInputLabel.model';
import { StyledInputLabel } from './InputLabel.style';

Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/LoadingSVGArrows/LoadingSVGArrows.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import styled, { keyframes } from 'styled-components';

import { SVGLoadingArrows } from '@/components/icons';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/MenuItem/MenueItem.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { StyledMenuItem } from './MenueItem.style';
import { sizeSettings } from './sizeSettings';

Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/NumberInput/NumberInput.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { forwardRef, useMemo } from 'react';

import { useNumberInput } from '@/components/atoms/NumberInput/useNumberInput.hook';
Expand Down
6 changes: 4 additions & 2 deletions src/components/atoms/PageNumberList/PageNumberList.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { FancyButton } from '@/components/organisms/FancyButton';
import { Wrapper } from './PageNumberList.style';
import { generateNumbers } from './utils/generateNumbers';
Expand Down Expand Up @@ -43,8 +45,8 @@ export default function PageNumberList(props: TPageNumberList) {
key={index}
textColor={
item !== currentPage
? numberButtonStyle?.textColor ?? 'secondary'
: numberButtonStyle?.textColorActive ?? 'accent'
? (numberButtonStyle?.textColor ?? 'secondary')
: (numberButtonStyle?.textColorActive ?? 'accent')
}
label={`${item}`}
onClick={(e) => handleClicked(e, index)}
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/PasswordEye/PasswordEye.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { SVGEyeCrossed } from '@/components/icons';
import { SVGEyeOpen } from '@/components/icons';
import { FancySVGAtom } from '@/components/atoms/FancySVGAtom';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/PasswordInput/PasswordInput.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { forwardRef, useEffect, useState } from 'react';

import { PasswordEye } from '@/components/atoms/PasswordEye';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { FancyBox } from '@/components/atoms/FancyBox';
import { TPasswordStrengthMeter } from '@/components/atoms/PasswordStrengthMeter/TPasswordStrengthMeter.model';
import { arrayToCssValues } from '@/design/designFunctions/arrayToCssValues';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/ProgressBar/ProgressBar.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { TProgressBarWithHTMLAttrs } from './ProgressBar.model';
import { ProgressBarContainer, ProgressBarFill } from './ProgressBar.style';

Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/RawA/RawA.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { StyledRawA } from '@/components/atoms/RawA/RawA.style';
import { TRawA } from './TRawA.model';

Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/RawButton/RawButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { styled } from 'styled-components';

const RawButton = styled.button`
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/RawCheckbox/RawCheckbox.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { useState, useEffect, forwardRef } from 'react';

import { FakeCheckbox, HidenCheckBox, InputContainer } from './RawCheckbox.style';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/RawInput/RawInput.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { styled } from 'styled-components';

import { TRawInputWith$ } from './TRawInput.model';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/RawLI/RawLI.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import styled from 'styled-components';

const RawLI = styled.li`
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/RawNav/RawNav.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { CSSProp, styled } from 'styled-components';

const RawNav = styled.nav<{ $externalStyle?: CSSProp }>`
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/RawRadio/RawRadio.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { forwardRef } from 'react';

import { TRawRadioWithHTMLAttrs } from '@/components/atoms/RawRadio/TRawRadio.model';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/RawSlider/RawSlider.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { useEffect, useState } from 'react';

import { TRawSliderWithNativeAttrs } from '@/components/atoms/RawSlider/TRawSlider.model';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/RawTextArea/RawTextArea.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { getBackgroundColor } from '@/design/designFunctions/colorCalculatorForComponent';
import { TLayer } from '@/types/TLayer';
import { TStyledPrefixAndPicker } from '@/types/TStyledPrefixAndPicker';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/RawUL/RawUL.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { styled } from 'styled-components';

const RawUL = styled.ul`
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/ScalingSection/ScalingSection.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import {
useEffect,
useRef,
Expand Down Expand Up @@ -85,7 +87,7 @@
document.removeEventListener('touchmove', handleMoveTouch);
document.removeEventListener('touchend', handleEnd);
};
}, [isDragging]);

Check warning on line 90 in src/components/atoms/ScalingSection/ScalingSection.tsx

View workflow job for this annotation

GitHub Actions / lint-and-format

React Hook useEffect has missing dependencies: 'handleEnd', 'handleMoveMouse', and 'handleMoveTouch'. Either include them or remove the dependency array

return (
<SytledScalingSection id={id} ref={ref} onTouchStart={handleStartTouch} onMouseDown={handleStartMouse}>
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/ScrollableBar/ScrollableBar.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { useRef } from 'react';
import { ScollAbleBar } from './SrollableBar.style';

Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/Seperator/Seperator.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { TSeperatorWithNativeAttrs } from './TSeperator.model';

import { FancyContent } from '@/components/molecules/FancyContent';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/SimpleDialog/SimpleDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { useEffect, useRef, useState } from 'react';
import { animated, useSpring } from '@react-spring/web';

Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/SingleInput/SingleInput.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { forwardRef, useState } from 'react';

import { TSingleInputAtomWithHTMLAttrs } from '@/components/atoms/SingleInput/TSingleInput.model';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/SkeletonBox/SkeletonBox.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { StyledSkeletonBox } from '@/components/atoms/SkeletonBox/SkeletonBox.style';
import { TSkeletonBoxWithHTMLAttrs } from '@/components/atoms/SkeletonBox/TSkeleton.model';
import { isAspectRatioValid } from '@/utils/validations/isAspectRatioValid';
Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/SliderMarker/SliderMarker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { TSliderMarkerWithHTMLAttrs } from '@/components/atoms/SliderMarker/TSlidermarker.model';
import { Marker, WrapperMarker } from './SliderMarker.style';

Expand Down
2 changes: 2 additions & 0 deletions src/components/atoms/SwipeUpContainer/SwipeUpContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { forwardRef } from 'react';
import { TSwipeUpContainerWithHTMLAttrs } from './SwipeUpContainer.model';
import { StyledSwipeUpContainer } from './SwipeUpContainer.style';
Expand Down
Loading
Loading