mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-15 09:09:10 +00:00
chore: update codestyle due to prettier/rule updates
This commit is contained in:
parent
f632bfa6e5
commit
10e095656f
16 changed files with 298 additions and 292 deletions
|
@ -1,5 +1,5 @@
|
|||
import { roleypolyTheme } from './theme';
|
||||
import { mdxComponents } from '../atoms/typography/mdx';
|
||||
import { roleypolyTheme } from './theme';
|
||||
|
||||
export const parameters = {
|
||||
actions: { argTypesRegex: '^on[A-Z].*' },
|
||||
|
|
|
@ -10,9 +10,10 @@ type DynamicLogoProps = LogoFlagProps & {
|
|||
};
|
||||
|
||||
export const DynamicLogomark = (props: Partial<DynamicLogoProps>) => {
|
||||
const variant = React.useMemo(() => getRelevantVariant(props.currentDate), [
|
||||
props.currentDate,
|
||||
]);
|
||||
const variant = React.useMemo(
|
||||
() => getRelevantVariant(props.currentDate),
|
||||
[props.currentDate]
|
||||
);
|
||||
|
||||
if (!variant) {
|
||||
return <Logomark {...props} />;
|
||||
|
@ -35,9 +36,10 @@ export const DynamicLogomark = (props: Partial<DynamicLogoProps>) => {
|
|||
};
|
||||
|
||||
export const DynamicLogotype = (props: Partial<DynamicLogoProps>) => {
|
||||
const variant = React.useMemo(() => getRelevantVariant(props.currentDate), [
|
||||
props.currentDate,
|
||||
]);
|
||||
const variant = React.useMemo(
|
||||
() => getRelevantVariant(props.currentDate),
|
||||
[props.currentDate]
|
||||
);
|
||||
|
||||
if (!variant) {
|
||||
return <Logotype {...props} />;
|
||||
|
|
|
@ -38,14 +38,14 @@ export const EditorCategory = (props: Props) => {
|
|||
const [roleSearchPopoverActive, setRoleSearchPopoverActive] = React.useState(false);
|
||||
const [roleSearchTerm, updateSearchTerm] = React.useState('');
|
||||
|
||||
const onUpdate = (key: keyof typeof props.category, pred?: (newValue: any) => any) => (
|
||||
newValue: any
|
||||
) => {
|
||||
props.onChange({
|
||||
...props.category,
|
||||
[key]: pred ? pred(newValue) : newValue,
|
||||
});
|
||||
};
|
||||
const onUpdate =
|
||||
(key: keyof typeof props.category, pred?: (newValue: any) => any) =>
|
||||
(newValue: any) => {
|
||||
props.onChange({
|
||||
...props.category,
|
||||
[key]: pred ? pred(newValue) : newValue,
|
||||
});
|
||||
};
|
||||
|
||||
const handleRoleSelect = (role: RoleType) => {
|
||||
setRoleSearchPopoverActive(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue