Skip to content

Commit b722036

Browse files
authored
Merge pull request #1426 from AppQuality/fixes
fixes
2 parents abece1f + 4cff250 commit b722036

File tree

4 files changed

+29
-34
lines changed

4 files changed

+29
-34
lines changed

src/common/components/Table/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ type TableProps<T extends TableData, K extends keyof T> = {
3737
emptyState?: JSX.Element;
3838
};
3939

40-
const TableWrapper = styled.div<{ maxHeight?: string }>`
40+
const TableWrapper = styled.div<{ $maxHeight?: string }>`
4141
width: 100%;
4242
padding-bottom: ${({ theme }) => theme.space.sm};
43-
${({ maxHeight }) =>
44-
maxHeight && `max-height: ${maxHeight}; overflow-y: auto;`}
43+
${({ $maxHeight }) =>
44+
$maxHeight && `max-height: ${$maxHeight}; overflow-y: auto;`}
4545
`;
4646

4747
const StyledHead = styled(Head)<{ isSticky?: boolean }>`
@@ -65,7 +65,7 @@ const Table = <T extends TableData, K extends keyof T>({
6565
return emptyState || null;
6666
}
6767
return (
68-
<TableWrapper maxHeight={maxHeight} style={style}>
68+
<TableWrapper $maxHeight={maxHeight} style={style}>
6969
<ZendeskTable>
7070
<StyledHead isSticky={isSticky}>
7171
<HeaderRow>

src/pages/JoinPage/Steps/Step2.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export const Step2 = () => {
2929
const { data: dataCompanySizes, isLoading: isLoadingCompanySizes } =
3030
useGetCompaniesSizesQuery();
3131
const selectRef = useRef<HTMLDivElement>(null);
32+
const roleSelectRef = useRef<HTMLDivElement>(null);
3233

3334
useEffect(() => {
3435
sendGTMevent({
@@ -148,7 +149,7 @@ export const Step2 = () => {
148149
{({ field, meta }: FieldProps) => {
149150
const hasError = meta.touched && Boolean(meta.error);
150151
return (
151-
<div ref={selectRef}>
152+
<div ref={roleSelectRef}>
152153
<Select
153154
placeholder={t('SIGNUP_FORM_ROLE_PLACEHOLDER')}
154155
data-qa="roleId-select"
@@ -169,7 +170,7 @@ export const Step2 = () => {
169170
onSelect={(roleId) => {
170171
setFieldValue('roleId', Number(roleId));
171172
(
172-
selectRef.current?.querySelector(
173+
roleSelectRef.current?.querySelector(
173174
'[role="combobox"]'
174175
) as HTMLElement | null
175176
)?.blur();

src/pages/Plan/index.tsx

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ import PlanPageHeader from './navigation/header/Header';
2525
import { PlanBody } from './PlanBody';
2626
import { formatModuleDate } from './utils/formatModuleDate';
2727

28-
const PlanPage = ({ plan }: { plan: GetPlansByPidApiResponse | undefined }) => {
28+
const PlanPageContent = ({
29+
plan,
30+
}: {
31+
plan: GetPlansByPidApiResponse | undefined;
32+
}) => {
2933
const { t } = useTranslation();
3034
const { activeTab, setActiveTab } = usePlanContext();
3135
const [searchParams, setSearchParams] = useSearchParams();
@@ -58,17 +62,10 @@ const PlanPage = ({ plan }: { plan: GetPlansByPidApiResponse | undefined }) => {
5862
}, []);
5963

6064
return (
61-
<Page
62-
title={t('__PLAN_PAGE_TITLE')}
63-
className="plan-page"
64-
route="plan"
65-
isMinimal
66-
excludeMarginTop
67-
excludeMarginBottom
68-
>
65+
<>
6966
<PlanPageHeader />
7067
<PlanBody />
71-
</Page>
68+
</>
7269
);
7370
};
7471

@@ -95,6 +92,7 @@ const Plan = () => {
9592
const navigate = useNavigate();
9693
const location = useLocation();
9794
const { planId } = useParams();
95+
const { t } = useTranslation();
9896
const { isError, data: plan } = useGetPlansByPidQuery(
9997
{
10098
pid: Number(planId).toString(),
@@ -145,11 +143,20 @@ const Plan = () => {
145143
}
146144

147145
return (
148-
<FormProvider initialValues={initialValues}>
149-
<PlanProvider>
150-
<PlanPage plan={plan} />
151-
</PlanProvider>
152-
</FormProvider>
146+
<Page
147+
title={t('__PLAN_PAGE_TITLE')}
148+
className="plan-page"
149+
route="plan"
150+
isMinimal
151+
excludeMarginTop
152+
excludeMarginBottom
153+
>
154+
<FormProvider initialValues={initialValues}>
155+
<PlanProvider>
156+
<PlanPageContent plan={plan} />
157+
</PlanProvider>
158+
</FormProvider>
159+
</Page>
153160
);
154161
};
155162

tests/fixtures/app.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,6 @@ import en from '../../src/locales/en/translation.json';
55
import itLinks from '../../src/locales/it/links.json';
66
import it from '../../src/locales/it/translation.json';
77

8-
// const suppressedWarnings = ['Warning: React does not recognize the'];
9-
10-
// const originalWarn = console.warn;
11-
// console.warn = function (...args) {
12-
// if (
13-
// typeof args[0] === 'string' &&
14-
// suppressedWarnings.some((entry) => args[0].includes(entry))
15-
// ) {
16-
// return;
17-
// }
18-
// originalWarn.apply(console, args);
19-
// };
20-
218
const resources = {
229
en: { translation: en, links: enLinks },
2310
it: { translation: it, links: itLinks },

0 commit comments

Comments
 (0)