Skip to content

Commit

Permalink
Merge pull request #463 from Sitecore/fix-linter-warnings
Browse files Browse the repository at this point in the history
Fix all linter or prettier warnings of sugcon24 project
  • Loading branch information
robearlam authored Apr 26, 2024
2 parents 5ef6cd4 + 92a6136 commit 41776e5
Show file tree
Hide file tree
Showing 12 changed files with 100 additions and 113 deletions.
2 changes: 1 addition & 1 deletion src/Project/Sugcon2024/Sugcon/src/basics/ButtonLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const ButtonLink = (props: ButtonLinkProps): JSX.Element => {
<Button variant={variant}>
<JssLink field={props.field} />
</Button>
)
);
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,5 @@ export const Default = (props: LinkProps): JSX.Element => {
};

export const Button = (props: LinkProps): JSX.Element => {
return (
<ButtonLink field={props.fields.Link} />
);
return <ButtonLink field={props.fields.Link} />;
};
9 changes: 2 additions & 7 deletions src/Project/Sugcon2024/Sugcon/src/components/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ import {
} from '@chakra-ui/react';
import clsx from 'clsx';
import { ChevronDownIcon, ChevronUpIcon } from '@chakra-ui/icons';
import {
HeaderHeights,
PaddingX,
PaddingY,
} from 'template/LayoutConstants';
import { HeaderHeights, PaddingX, PaddingY } from 'template/LayoutConstants';

export interface Fields {
Id: string;
Expand All @@ -40,7 +36,6 @@ export interface Fields {
Styles: string[];
}


export type NavigationProps = {
params?: ComponentParams;
fields: Fields;
Expand Down Expand Up @@ -154,7 +149,7 @@ const ResponsiveNavigation = ({
navigationMenuItems,
onToggle,
pageEditing,
rendering
rendering,
}: ResponsiveNavigationProps): JSX.Element => {
return (
<Box as="nav" role="navigation" aria-label="SUGCON" ml={{ base: 0, lg: 'auto' }}>
Expand Down
3 changes: 1 addition & 2 deletions src/Project/Sugcon2024/Sugcon/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ function App({ Component, pageProps }: AppProps<SitecorePageProps>): JSX.Element
const { dictionary, ...rest } = pageProps;

// Vercel Speed Insights - Turned on and off through env variable.
const isSpeedInsightsEnabled =
process.env.NEXT_PUBLIC_ENABLE_SPEED_INSIGHTS === 'true';
const isSpeedInsightsEnabled = process.env.NEXT_PUBLIC_ENABLE_SPEED_INSIGHTS === 'true';

return (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ export const Button: Story = {
value: {
href: 'https://www.google.com',
text: 'Register Now',
linktype: 'external'
linktype: 'external',
},
},
},
},
};

Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ export const Link: Story = {
},
},
},
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,63 @@ import { Meta, StoryObj } from '@storybook/react';
import { Default as Person } from '../../../components/Basic Components/Person';

const meta = {
title: 'Basic Components/Person',
component: Person,
tags: ['autodocs'],
argTypes: {},
title: 'Basic Components/Person',
component: Person,
tags: ['autodocs'],
argTypes: {},
} satisfies Meta<typeof Person>;

export default meta;

type Story = StoryObj<typeof meta>;

export const PersonStory: Story = {
name: 'Person',
args: {
params: {
styles: '',
name: 'Person',
args: {
params: {
styles: '',
},
fields: {
Company: {
value: 'Perficient',
},
Name: {
value: 'Eric Sanner',
},
JobRole: {
value: 'Solution Architect',
},
Biography: {
value: 'This is a test',
},
Linkedin: {
value: {
href: 'https://www.linkedin.com/in/ericsanner/',
text: 'Linkedin',
linktype: 'external',
url: 'https://www.linkedin.com/in/ericsanner/',
anchor: '',
target: '',
},
fields: {
Company: {
value: 'Perficient',
},
Name: {
value: 'Eric Sanner',
},
JobRole: {
value: 'Solution Architect',
},
Biography: {
value: 'This is a test',
},
Linkedin: {
value: {
href: 'https://www.linkedin.com/in/ericsanner/',
text: 'Linkedin',
linktype: 'external',
url: 'https://www.linkedin.com/in/ericsanner/',
anchor: '',
target: '',
},
},
Twitter: {
value: {
href: 'https://www.linkedin.com/in/ericsanner/',
text: 'X',
linktype: 'external',
url: 'https://www.linkedin.com/in/ericsanner/',
anchor: '',
target: '',
},
},
Image: {
value: {
src: '../../../../images/EricSanner.png',
alt: '',
width: '400',
height: '400',
},
},
}
}
},
Twitter: {
value: {
href: 'https://www.linkedin.com/in/ericsanner/',
text: 'X',
linktype: 'external',
url: 'https://www.linkedin.com/in/ericsanner/',
anchor: '',
target: '',
},
},
Image: {
value: {
src: '../../../../images/EricSanner.png',
alt: '',
width: '400',
height: '400',
},
},
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@ import { Meta, StoryObj } from '@storybook/react';
import { Default as Agenda } from '../../../components/Events/Agenda';

const meta = {
title: 'Events/Agenda',
component: Agenda,
tags: ['autodocs'],
argTypes: {},
title: 'Events/Agenda',
component: Agenda,
tags: ['autodocs'],
argTypes: {},
} satisfies Meta<typeof Agenda>;

export default meta;

type Story = StoryObj<typeof meta>;

export const AgendaStory: Story = {
name: 'Agenda',
args: {
params: {
styles: '',
},
fields: {
SessionizeUrl: {
value: "https://sessionize.com/api/v2/ekimnhe4/view/GridSmart"
}
}

}
name: 'Agenda',
args: {
params: {
styles: '',
},
fields: {
SessionizeUrl: {
value: 'https://sessionize.com/api/v2/ekimnhe4/view/GridSmart',
},
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@ import { Meta, StoryObj } from '@storybook/react';
import { Default as Sessions } from '../../../components/Events/Sessions';

const meta = {
title: 'Events/Sessions',
component: Sessions,
tags: ['autodocs'],
argTypes: {},
title: 'Events/Sessions',
component: Sessions,
tags: ['autodocs'],
argTypes: {},
} satisfies Meta<typeof Sessions>;

export default meta;

type Story = StoryObj<typeof meta>;

export const SessionsStory: Story = {
name: 'Sessions',
args: {
params: {
styles: '',
},
fields: {
SessionizeUrl: {
value: "https://sessionize.com/api/v2/ekimnhe4/view/Sessions"
}
}

}
name: 'Sessions',
args: {
params: {
styles: '',
},
fields: {
SessionizeUrl: {
value: 'https://sessionize.com/api/v2/ekimnhe4/view/Sessions',
},
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ export const Default: Story = {
},
items: [
{
fields: {
Link: { value: { src:"https://www.sitecore.com"} },
Icon: {
fields: {
CssClass: { value: "" }
}
}
}
}
]
fields: {
Link: { value: { src: 'https://www.sitecore.com' } },
Icon: {
fields: {
CssClass: { value: '' },
},
},
},
},
],
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Default as DefaultSponsorListing } from './SponsorListing.Default.stori

const meta = {
title: 'Sponsors/SponsorListing',

component: LogoOnly,
parameters: {
layout: 'padded',
Expand All @@ -19,4 +18,4 @@ type Story = StoryObj<typeof meta>;
export const SponsorListLogoOnly: Story = {
name: 'Logo Only',
args: DefaultSponsorListing.args,
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Default as DefaultSponsorListing } from './SponsorListing.Default.stori

const meta = {
title: 'Sponsors/SponsorListing',

component: LogoWithPopup,
parameters: {
layout: 'padded',
Expand All @@ -19,4 +18,4 @@ type Story = StoryObj<typeof meta>;
export const SponsorListLogoWithPopup: Story = {
name: 'Logo with pop-up',
args: DefaultSponsorListing.args,
};
};

0 comments on commit 41776e5

Please sign in to comment.