
* feat: add crowdin and supported languages * fix: main branch name * feat: test crowdin integration * feat: add crowdin config skeleton * feat: update crowdin.yml * fix: remove ro translation * test: en translation * test: en translation * New Crowdin translations by Github Action (#735) Co-authored-by: Crowdin Bot <support+bot@crowdin.com> * test: en translation * fix: separate upload/download workflows * wip * New Crowdin translations by Github Action (#738) Co-authored-by: Crowdin Bot <support+bot@crowdin.com> * wip * wip * wip * wip * wip * typo * wip * wip * update crowdin config * update * chore: support i18n de,es,fr,it,pt,ru,ro,en * chore: extract i18n strings * chore: extract booking components strings for i18n * wip * extract more strings * wip * fallback to getServerSideProps for now * New Crowdin translations by Github Action (#874) Co-authored-by: Crowdin Bot <support+bot@crowdin.com> * fix: minor fixes on the datepicker * fix: add dutch lang * fix: linting issues * fix: string * fix: update GHA * cleanup trpc * fix linting Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Crowdin Bot <support+bot@crowdin.com> Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
37 lines
972 B
TypeScript
37 lines
972 B
TypeScript
import { useLocale } from "@lib/hooks/useLocale";
|
|
import { Member } from "@lib/member";
|
|
|
|
import MemberListItem from "./MemberListItem";
|
|
|
|
export default function MemberList(props: {
|
|
localeProp: string;
|
|
members: Member[];
|
|
onRemoveMember: (text: Member) => void;
|
|
onChange: (text: string) => void;
|
|
}) {
|
|
const { locale } = useLocale({ localeProp: props.localeProp });
|
|
|
|
const selectAction = (action: string, member: Member) => {
|
|
switch (action) {
|
|
case "remove":
|
|
props.onRemoveMember(member);
|
|
break;
|
|
}
|
|
};
|
|
|
|
return (
|
|
<div>
|
|
<ul className="px-4 mb-2 bg-white border divide-y divide-gray-200 rounded">
|
|
{props.members.map((member) => (
|
|
<MemberListItem
|
|
localeProp={locale}
|
|
onChange={props.onChange}
|
|
key={member.id}
|
|
member={member}
|
|
onActionSelect={(action: string) => selectAction(action, member)}
|
|
/>
|
|
))}
|
|
</ul>
|
|
</div>
|
|
);
|
|
}
|